remove system-specific files

This commit is contained in:
AJ ONeal 2015-11-28 05:22:57 +00:00
parent 3f68c489ff
commit aa54664f80
4 changed files with 0 additions and 91 deletions

View File

@ -1,5 +0,0 @@
#!/bin/bash
sudo rsync -v walnut /etc/init.d/
sudo chmod 755 /etc/init.d/walnut
sudo update-rc.d walnut defaults

View File

@ -1,39 +0,0 @@
### BEGIN INIT INFO
# Provides: walnut
# Required-Start: $all
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: WALNUT Home Cloud
### END INIT INFO
export PATH=$PATH:/bin:/usr/bin:/usr/local/bin
PIDFILE=/var/run/walnut.pid
DATE=`date '+%F_%H-%M-%S'`
cd /srv/walnut
case "$1" in
start)
mkdir -p /srv/walnut/logs
mkdir -p /srv/walnut/.forever
exec forever -p /srv/walnut/.forever --minUptime=20000 --spinSleepTime=100 --workingDir=/srv/walnut/ -l "/srv/walnut/logs/access.${DATE}.log" -e "/srv/walnut/logs/error.${DATE}.log" --pidFile=$PIDFILE start /srv/walnut/bin/walnut.js
;;
stop)
exec forever stopall
;;
restart)
mkdir -p /srv/walnut/logs
mkdir -p /srv/walnut/.forever
exec forever stopall
exec forever -p /srv/walnut/.forever --minUptime=20000 --spinSleepTime=100 --workingDir=/srv/walnut/ -l "/srv/walnut/logs/access.${DATE}.log" -e "/srv/walnut/logs/error.${DATE}.log" --pidFile=$PIDFILE start /srv/walnut/bin/walnut.js
;;
*)
echo "Usage: /etc/init.d/walnut {start|stop}"
exit 1
;;
esac
exit 0

View File

@ -1,23 +0,0 @@
# sudo rsync -av etc/init/caddy.conf /etc/init/caddy.conf
description "Caddy Server"
version "1.0"
author "AJ ONeal"
# 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
# exec /usr/local/bin/caddy -conf /srv/walnut/Caddyfile -pidfile /tmp/caddy.pid \
exec start-stop-daemon --start --pidfile /tmp/caddy.pid --exec /usr/local/bin/caddy -- -conf /srv/walnut/Caddyfile --pidfile /tmp/caddy.pid \
> "./logs/access.caddy.${DATE}.log" \
2> "./logs/error.caddy.${DATE}.log"
end script

View File

@ -1,24 +0,0 @@
# sudo rsync -av upstart-walnut /etc/init/walnut.conf
# sudo service walnut restart
description "WALNUT application host"
version "1.0"
author "AJ ONeal"
# 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
exec node bin/walnut \
> "./logs/access.${DATE}.log" \
2> "./logs/error.${DATE}.log"
end script