0
包裝腳本獨立工作,但我不能停止或通過暴發戶啓動該過程。 ubuntu停止並開始掛起,並且我期待守護進程開啓pid跟蹤,因爲它有它自己的pid文件。紅寶石不會啓動或停止與新貴
/etc/init/tracks.conf:
start on runlevel [2345] and started networking
stop on runlevel [!2345] or stopped networking
author "Root <[email protected]>"
description "tracks wrapper for upstart"
expect daemon
exec sudo -u ubuntu /usr/local/bin/tracks >> /home/ubuntu/tracks/log/upstart.log 2>&1
respawn
respawn limit 1 10
在/ usr/local/bin目錄/跟蹤包裝腳本:
#!/bin/bash
source /etc/profile.d/rvm.sh
export rvmsudo_secure_path=1
cd /home/ubuntu/tracks && /usr/local/rvm/bin/rvmsudo bundle exec rails server -e production -p 80 -d