From 627c6e3b3e63b40e2e0bbb76374002894ebd22ac Mon Sep 17 00:00:00 2001 From: Sean DuBois Date: Mon, 21 Jul 2014 22:31:03 +0000 Subject: [PATCH] Better comment for Debian init scripts, remove trailing white space in Ubuntu init file --- init-scripts/debian.sh | 2 +- init-scripts/ubuntu_14_04 | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/init-scripts/debian.sh b/init-scripts/debian.sh index 201b51d..9b05c35 100755 --- a/init-scripts/debian.sh +++ b/init-scripts/debian.sh @@ -21,7 +21,7 @@ fi USER="root" -#FIXME +#FIXME your GOPATH GOPATH="GOPATH" WORKDIR="/var/run/fail2ban" #FIXME path to your fail2rest binary diff --git a/init-scripts/ubuntu_14_04 b/init-scripts/ubuntu_14_04 index 5708007..b7e97fa 100644 --- a/init-scripts/ubuntu_14_04 +++ b/init-scripts/ubuntu_14_04 @@ -22,32 +22,32 @@ DAEMON="$DAEMON_DIR/$NAME" DAEMON_ARGS="-config=$DAEMON_DIR/config.json" #CHANGE TO THE NAME OF YOUR FAIL2REST CONFIG FILE NAME AND DIRECTORY IF NEED BE PIDFILE=/var/run/$NAME.pid SCRIPTNAME=/etc/init.d/$NAME - + # Load the VERBOSE setting and other rcS variables . /lib/init/vars.sh - + # Define LSB log_* functions. # Depend on lsb-base (>= 3.0-6) to ensure that this file is present . /lib/lsb/init-functions - + # # Function that starts the daemon/service # do_start () { - # Return + # Return # 0 if daemon has been started # 1 if daemon was already running # 2 if daemon could not be started log_daemon_msg "Starting system $NAME daemon" start-stop-daemon --start --background --pidfile $PIDFILE --make-pidfile --chdir $DAEMON_DIR --exec $DAEMON -- $DAEMON_ARGS log_end_msg $? - + # Add code here, if necessary, that waits for the process to be ready # to handle requests from services started subsequently which depend # on this one. As a last resort, sleep for some time. } - + # # Function that stops the daemon/service # @@ -62,14 +62,14 @@ do_stop() start-stop-daemon --stop --retry=10 --pidfile $PIDFILE log_end_msg $? } - + case "$1" in start|stop) do_${1} ;; restart|reload|force-reload) - do_stop - do_start + do_stop + do_start ;; status) status_of_proc "$NAME" "$DAEMON" && exit 0 || exit $? @@ -79,5 +79,5 @@ case "$1" in exit 3 ;; esac - + :