Merge pull request #1359 from bitpayalan/master
improved upstart script
This commit is contained in:
commit
ac01ef242d
|
@ -5,22 +5,25 @@ author "BitPay, Inc."
|
||||||
|
|
||||||
limit nofile 20000 30000
|
limit nofile 20000 30000
|
||||||
|
|
||||||
start on started [2345]
|
start on runlevel [2345]
|
||||||
stop on runlevel [016]
|
stop on runlevel [016]
|
||||||
kill timeout 300
|
|
||||||
|
|
||||||
|
kill timeout 300
|
||||||
|
kill signal SIGINT
|
||||||
|
|
||||||
|
# user/group for bitcore daemon to run as
|
||||||
setuid bitcore
|
setuid bitcore
|
||||||
setgid bitcore
|
setgid bitcore
|
||||||
|
|
||||||
env HOME=/opt/bitcore
|
# home dir of the bitcore daemon user
|
||||||
env PATH=/opt/bitcore/.nvm/v0.12.7/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
env HOME=/home/bitcore
|
||||||
|
|
||||||
|
# path should include the correct version of node
|
||||||
|
env PATH=/home/bitcore/.nvm/versions/node/v0.12.7/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
||||||
|
|
||||||
respawn
|
respawn
|
||||||
respawn limit 5 15
|
respawn limit 5 15
|
||||||
|
|
||||||
chdir /opt/bitcore
|
|
||||||
|
|
||||||
script
|
script
|
||||||
. /opt/bitcore/.nvm
|
|
||||||
exec bitcored
|
exec bitcored
|
||||||
end script
|
end script
|
||||||
|
|
Loading…
Reference in New Issue