-
-
Save davestephens/afb321663fa83c9dd0ba83a2b33e75e7 to your computer and use it in GitHub Desktop.
Revisions
-
davestephens revised this gist
Jun 27, 2016 . 1 changed file with 1 addition and 5 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -23,11 +23,7 @@ DESC="mystic internet server" MIS_OPTS= PID="$MYSTICINSTALLPATH/semaphore/$NAME.bsy" # Check if DAEMON binary exists [ -f $DAEMON ] || exit 0 [ -f "/etc/default/$NAME" ] && . /etc/default/$NAME -
davestephens renamed this gist
Jun 27, 2016 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
davestephens created this gist
Jun 27, 2016 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,74 @@ #!/bin/sh ### BEGIN INIT INFO # Provides: mis # Required-Start: $remote_fs # Required-Stop: $remote_fs # Should-Start: $all # Should-Stop: $all # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Mystic Internet Server # Description: mis is the launcher for Mystic's Internet Servers ### END INIT INFO set -e . /lib/lsb/init-functions MYSTICINSTALLPATH=/mystic DAEMON=$MYSTICINSTALLPATH/mis NAME=mis DESC="mystic internet server" MIS_OPTS= PID="$MYSTICINSTALLPATH/semaphore/$NAME.bsy" echo $PID echo $DAEMON # Check if DAEMON binary exist [ -f $DAEMON ] || exit 0 [ -f "/etc/default/$NAME" ] && . /etc/default/$NAME MIS_OPTS="-d" case "$1" in start) log_daemon_msg "Starting $DESC" "$NAME" if start-stop-daemon -d $MYSTICINSTALLPATH --start --quiet --pidfile $PID --exec $DAEMON -- $MIS_OPTS 1>/dev/null then log_end_msg 0 else log_end_msg 1 fi ;; stop) log_daemon_msg "Stopping $DESC" "$NAME" if start-stop-daemon --retry TERM/5/KILL/5 --stop --quiet --pidfile $PID 1>/dev/null then log_end_msg 0 else log_end_msg 1 fi ;; restart) log_daemon_msg "Restarting $DESC" "$NAME" start-stop-daemon --retry TERM/5/KILL/5 --stop --quiet --pidfile $PID 1>/dev/null if start-stop-daemon -d $MYSTICINSTALLPATH --start --quiet --oknodo --pidfile $PID --exec $DAEMON -- $MIS_OPTS 1>/dev/null then log_end_msg 0 else log_end_msg 1 fi ;; status) status_of_proc -p $PID $DAEMON $NAME ;; *) log_action_msg "Usage: /etc/init.d/$NAME {start|stop|restart|status}" ;; esac exit 0 This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,6 @@ check process mystic with pidfile /mystic/semaphore/mis.bsy group mystic start program = "/etc/init.d/mis start" stop program = "/etc/init.d/mis stop" if failed host 127.0.0.1 port 23 type tcp then restart if 5 restarts within 5 cycles then timeout