Files
toallab-automation/roles/sage905.mineos/files/upstart_conf
2019-06-24 20:14:08 -04:00

36 lines
908 B
Plaintext
Executable File

# mineos -
description "mineos minecraft front-end"
author "Will Dizon <wdchromium@gmail.com>"
env NODE_PATH=/usr/local/lib/npm/lib/node_modules
env NPM_CONFIG_PREFIX=/usr/local/lib/npm
env PATH=/usr/local/lib/npm/bin:/sbin:/bin:/usr/sbin:/usr/bin
export NODE_PATH
export NPM_CONFIG_PREFIX
export PATH
# Stanzas
#
# Stanzas control when and how a process is started and stopped
# See a list of stanzas here: http://upstart.ubuntu.com/wiki/Stanzas#respawn
# When to start the service
start on runlevel [2345]
# When to stop the service
stop on runlevel [016]
# Automatically restart process if crashed
respawn
# Essentially lets upstart know the process will detach itself to the background
expect daemon
# Specify working directory
chdir /usr/games/minecraft
# Start the process
#exec procenv --file=/tmp/procenv-job2.log --exec -- /usr/bin/node service.js start
exec /usr/bin/node service.js start