system-config/modules/etherpad_lite/templates/upstart.erb
Clark Boylan 25919b7644 Go back to using self compiled node.js.
The version of node.js packaged by ubuntu does not seem to play nice
with require-kernel and etherpad-lite. Go back to compiling version
0.6.16 of node.js which is tested and appears to be working.

Change-Id: Ib9bda5d7acbda06561398a0c715b28e46edb531d
2012-06-21 17:52:43 +00:00

27 lines
786 B
Plaintext

description "etherpad-lite"
start on started networking
stop on runlevel [!2345]
env EPHOME=<%= base_install_dir %>/etherpad-lite
env EPLOGS=<%= base_log_dir %>/<%= ep_user %>
env EPUSER=<%= ep_user %>
respawn
pre-start script
chdir $EPHOME
mkdir $EPLOGS ||true
chown $EPUSER:admin $EPLOGS ||true
chmod 0755 $EPLOGS ||true
chown -R $EPUSER:admin $EPHOME/var ||true
bin/installDeps.sh >> $EPLOGS/error.log || { stop; exit 1; }
end script
script
cd $EPHOME
exec su -s /bin/sh -c 'exec "$0" "$@"' $EPUSER -- /usr/local/bin/node node_modules/ep_etherpad-lite/node/server.js \
>> $EPLOGS/access.log \
2>> $EPLOGS/error.log
end script