Clark Boylan 521672bc35 Convert from etherpad to ethercalc
This begins the conversion process. We keep the bulk of the nodejs and
apache configuration. Remove mysql and replace with redis and so on.

This is not a complete conversion, future work should include
authenticated redis configuration and systemd support. However, this
should be able to get the service running with a basic set of
features and functionality.

Change-Id: Id10247211d9643e81bb1b6e8fb67377ba6de873a
2017-01-20 12:44:41 -08:00

29 lines
822 B
Plaintext

description "ethercalc"
start on started networking
stop on runlevel [!2345]
env ETHERCALC_HOME=<%= @base_install_dir %>
env ETHERCALC_LOGS=<%= @base_log_dir %>/<%= @ethercalc_user %>
env ETHERCALC_USER=<%= @ethercalc_user %>
respawn
pre-start script
chdir $ETHERCALC_HOME
mkdir $ETHERCALC_LOGS ||true
chown -R $ETHERCALC_USER:admin $ETHERCALC_LOGS ||true
chmod 0755 $ETHERCALC_LOGS ||true
chown -R $ETHERCALC_USER:admin $ETHERCALC_HOME/var ||true
end script
setuid <%= @ethercalc_user %>
setgid <%= @ethercalc_user %>
limit nofile 8192 16384
script
cd $ETHERCALC_HOME
/bin/bash node_modules/ethercalc/bin/run.sh \
>> $ETHERCALC_LOGS/access.log \
2>> $ETHERCALC_LOGS/error.log
end script