aboutsummaryrefslogtreecommitdiffstats
path: root/config/sysvinit.example
diff options
context:
space:
mode:
authorGareth Rees <gareth@mysociety.org>2014-08-07 12:25:14 +0100
committerGareth Rees <gareth@mysociety.org>2014-08-07 12:25:14 +0100
commitca92eb8c15534ebdc30d01e09c6ca51ff4220e98 (patch)
treec17a5b7d658854b3025076179101364521d07412 /config/sysvinit.example
parentfd4c0668f89eabc1974c8454f85ef90bb3dfe0ee (diff)
parentefa7f24c08c0cffa373b44ec4745a698003f85f2 (diff)
Merge branch 'sysvinit-example' into rails-3-develop
Diffstat (limited to 'config/sysvinit.example')
-rwxr-xr-xconfig/sysvinit.example53
1 files changed, 0 insertions, 53 deletions
diff --git a/config/sysvinit.example b/config/sysvinit.example
deleted file mode 100755
index 443e7c3fb..000000000
--- a/config/sysvinit.example
+++ /dev/null
@@ -1,53 +0,0 @@
-#! /bin/sh
-### BEGIN INIT INFO
-# Provides: application-thin-alaveteli
-# Required-Start: $local_fs $network
-# Required-Stop: $local_fs $network
-# Default-Start: 2 3 4 5
-# Default-Stop: 0 1 6
-# Short-Description: Starts the Thin web server for the "Alaveteli" site
-# Description: The Thin web server for the "Alaveteli" site
-### END INIT INFO
-
-# This example sysvinit script is based on the helpful example here:
-# http://richard.wallman.org.uk/2010/02/howto-deploy-a-catalyst-application-using-fastcgi-and-nginx/
-
-PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
-SITE_HOME=/var/www/alaveteli
-NAME=alaveteli
-DESC="Alaveteli app server"
-USER=fms
-
-echo $DAEMON
-test -f $DAEMON || exit 0
-
-set -e
-
-start_daemon() {
- su -l -c "cd $SITE_HOME/alaveteli && bundle exec thin -d -p 3300 -e development start" $USER
-}
-
-stop_daemon() {
- pkill -f thin -u $USER || true
-}
-
-case "$1" in
- start)
- start_daemon
- ;;
- stop)
- stop_daemon
- ;;
- reload|restart|force-reload)
- stop_daemon
- sleep 5
- start_daemon
- ;;
- *)
- N=/etc/init.d/$NAME
- echo "Usage: $N {start|stop|reload|restart|force-reload}" >&2
- exit 1
- ;;
-esac
-
-exit 0