Created
April 14, 2014 09:04
-
-
Save Seraf/10630083 to your computer and use it in GitHub Desktop.
LISA Server Daemon
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: lisa-server | |
# Required-Start: $local_fs $remote_fs $network $syslog | |
# Required-Stop: $local_fs $remote_fs $network $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Start/stop Lisa server | |
### END INIT INFO | |
logger "Lisa Server: Start script executed" | |
case "$1" in | |
start) | |
logger "Lisa Server: Starting" | |
echo "Starting Lisa Server..." | |
twistd -y lisa-server --logfile="/var/log/lisa/server/lisa.log" --pidfile="/var/run/lisa/server.pid --static=/var/lib/lisa/server/static --plugins=/var/lib/lisa/server/plugins" | |
;; | |
stop) | |
logger "Lisa Server: Stopping" | |
echo "Stopping Lisa server..." | |
kill `cat /var/run/lisa/server.pid` | |
;; | |
*) | |
logger "Lisa server: Invalid usage" | |
echo "Usage: /etc/init.d/lisa-server {start|stop}" | |
exit 1 | |
;; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment