簡體   English   中英

HHVM / Hiphop的新貴腳本

[英]Upstart script for HHVM/Hiphop

我正在嘗試在Ubuntu 13.04服務器上為HHVM aka 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.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之后對此建模,它似乎可以工作。 我懷疑這是因為您使用的-m服務器導致它永遠不會從exec返回。 使用-m守護程序。 因人而異

# 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

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM