Ubuntu HHVM/Hiphop的Upstart脚本
我正试图在Ubuntu13.04服务器上为HHVM(又名Hiphop PHP)建立一个新的启动程序,因此它在启动时启动,在意外终止时重新启动 脚本位于:Ubuntu HHVM/Hiphop的Upstart脚本,ubuntu,upstart,hiphop,hhvm,Ubuntu,Upstart,Hiphop,Hhvm,我正试图在Ubuntu13.04服务器上为HHVM(又名Hiphop PHP)建立一个新的启动程序,因此它在启动时启动,在意外终止时重新启动 脚本位于: /etc/init/hhvm.conf 到目前为止,我得到的是: # Upstart HHVM script # This script will start/stop HHVM webserver description "Start and stop the HHVM webserver (Hiphop-PHP)" version "0
/etc/init/hhvm.conf
到目前为止,我得到的是:
# Upstart HHVM script
# This script will start/stop HHVM webserver
description "Start and stop the HHVM webserver (Hiphop-PHP)"
version "0.1"
author "RouteXL.com"
# Set the executable and the settings files
env RUN=/usr/share/hhvm/hiphop-php/hphp/hhvm/hhvm
env CONFIG=/etc/hhvm.hdf
# Run at startup when ready
start on (local-filesystems and net-device-up IFACE!=lo)
# Stop the webserver when server closes down
stop on runlevel [016]
# Respawn th webserver when unexpectedly stopped
respawn
# Expect the process to fork
expect fork
expect daemon
# The command to execute to start it up
exec $RUN -m server -c $CONFIG
当我进入时,不会发生任何事情:
sudo start hhvm
怎么了?Ubuntu 12.04。我根据sshd.conf对其进行了建模,它似乎可以工作。我怀疑这是因为您使用的是-mserver,这导致它永远不会从exec返回。使用-m守护进程。 YMMV
Ubuntu 12.04。我根据sshd.conf对其进行了建模,它似乎可以工作。我怀疑这是因为您使用的是-mserver,这导致它永远不会从exec返回。使用-m守护进程。 YMMV
你试过内置软件包吗?你试过内置软件包吗?
# hhvm - HipHop VM
#
# The HipHopVM server provides a high performance PHP stack and web server.
description "HHVM server"
author "Yermo Lamers http://twitter.com/yermolamers"
start on filesystem or runlevel [2345]
stop on runlevel [!2345]
respawn
respawn limit 10 5
umask 022
# Location of config and executable
env SERVER=/usr/local/bin/hhvm
env CONFIG_FILE=/usr/local/etc/hhvm.hdf
env RUN_AS=www-data
exec $SERVER -m daemon --config $CONFIG_FILE --user $RUN_AS