mirror of
https://github.com/Sean-Der/fail2rest.git
synced 2024-12-22 05:32:20 +01:00
Better comment for Debian init scripts, remove trailing white space in Ubuntu init file
This commit is contained in:
parent
f2ba06db87
commit
627c6e3b3e
2 changed files with 11 additions and 11 deletions
|
@ -21,7 +21,7 @@ fi
|
|||
|
||||
|
||||
USER="root"
|
||||
#FIXME
|
||||
#FIXME your GOPATH
|
||||
GOPATH="GOPATH"
|
||||
WORKDIR="/var/run/fail2ban"
|
||||
#FIXME path to your fail2rest binary
|
||||
|
|
|
@ -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
|
||||
|
||||
|
||||
:
|
||||
|
|
Loading…
Reference in a new issue