walnut.js/etc/init/walnut.conf

22 lines
534 B
Plaintext
Raw Normal View History

2015-02-12 09:40:37 +00:00
description "WALNUT, by Daplie"
2015-11-23 08:56:19 +00:00
version "0.7"
2015-02-12 09:40:37 +00:00
author "Daplie Inc"
# Upstart has nothing in $PATH by default
env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
# Keep the server running on crash or machine reboot
respawn
respawn limit 10 120
start on runlevel [2345]
# Start the server using spark and redirect output to log files
script
DATE=`date '+%F_%H-%M-%S'`
cd /srv/walnut
mkdir -p logs
2015-11-23 08:56:19 +00:00
exec node ./core/bin/walnut \
2015-02-12 09:40:37 +00:00
> "./logs/access.${DATE}.log" \
2> "./logs/error.${DATE}.log"
end script