2013-09-25 4 views
1

우분투 13.04 서버에서 HHVM 일명 Hiphop PHP 용 시동을 설정하려고하기 때문에 시동시 시작되고 예기치 않게 종료되면 다시 시작됩니다.HHVM/Hiphop 용 시동 스크립트

스크립트에 있습니다

/etc/init/hhvm.conf 

이것은 내가 지금까지있어 무엇 :

sudo start hhvm 

문제점은 무엇입니까 : 내가 입력 할 때

# 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 

아무런 변화가 없다?

+0

내장 패키지를 사용해 보셨습니까? https://github.com/facebook/hhvm/wiki/Prebuilt-Packages-on-Ubuntu-13.04 – yhager

답변

1

우분투 12.04. sshd.conf 다음에 이것을 모델링했는데 제대로 작동하는 것 같습니다. 나는 당신이 exec에서 돌아 오지 않는 -m 서버를 사용하고 있기 때문에 그것이 의심 스럽다. -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