From aa54664f8013c7e345f469cdc3fe7062aa08a489 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Sat, 28 Nov 2015 05:22:57 +0000 Subject: [PATCH] remove system-specific files --- etc/init.d/install.sh | 5 ----- etc/init.d/walnut | 39 --------------------------------------- etc/init/caddy.conf | 23 ----------------------- upstart-walnut | 24 ------------------------ 4 files changed, 91 deletions(-) delete mode 100755 etc/init.d/install.sh delete mode 100755 etc/init.d/walnut delete mode 100644 etc/init/caddy.conf delete mode 100644 upstart-walnut diff --git a/etc/init.d/install.sh b/etc/init.d/install.sh deleted file mode 100755 index 2e5ddd6..0000000 --- a/etc/init.d/install.sh +++ /dev/null @@ -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 diff --git a/etc/init.d/walnut b/etc/init.d/walnut deleted file mode 100755 index 009252a..0000000 --- a/etc/init.d/walnut +++ /dev/null @@ -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 diff --git a/etc/init/caddy.conf b/etc/init/caddy.conf deleted file mode 100644 index 4535e67..0000000 --- a/etc/init/caddy.conf +++ /dev/null @@ -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 diff --git a/upstart-walnut b/upstart-walnut deleted file mode 100644 index 0f789a4..0000000 --- a/upstart-walnut +++ /dev/null @@ -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