From: Urban Wallasch Date: Fri, 12 Apr 2019 19:15:26 +0000 (+0200) Subject: * Fixed and amended the gogopherd.sh init script. X-Git-Url: https://git.packet-gain.de/?a=commitdiff_plain;h=5a80738bc2126a4c7e5688edac1cf9655fb2109a;p=gogopherd.git * Fixed and amended the gogopherd.sh init script. --- diff --git a/gogopherd.sh b/gogopherd.sh index 1354cf6..9d997cf 100755 --- a/gogopherd.sh +++ b/gogopherd.sh @@ -1,29 +1,33 @@ #!/bin/sh ### BEGIN INIT INFO -# Provides: gopherd -# Required-Start: $network -# Required-Stop: $network -# Default-Start: 2 3 4 5 -# Default-Stop: -# Short-Description: Start gopher server +# Provides: gogopherd +# Required-Start: $local_fs $remote_fs $network $named +# Required-Stop: $local_fs $remote_fs $network $named +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: gogopherd gopher server +# Description: Start and stop the gogopherd gopher server using start-stop-daemon. ### END INIT INFO -PATH=/sbin:/bin:/usr/sbin:/usr/bin - -. /lib/lsb/init-functions - PREFIX=/usr/local +PATH=/sbin:/bin:/usr/sbin:/usr/bin + DAEMON="$PREFIX/bin/gogopherd" CFGFILE="$PREFIX/etc/gogopherd.cfg" +DFLTFILE="$PREFIX/etc/default/gogopherd" +GOGOPTS="-c $CFGFILE" +DESC="gogopher server" +NAME=gogopherd PIDFILE=/var/run/gogopherd.pid -GOGOPTS="$GOGOPTS -c $CFGFILE" +LOCKFILE=/run/lock/gogopherd -test -x $DAEMON || exit 5 -test -f $CFGFILE || exit 5 +[ -x "$DAEMON" ] || exit 5 +[ -r "$CFGFILE" ] || exit 5 +[ -r "$DFLTFILE" ] && . "$DFLTFILE" -LOCKFILE=/run/lock/gogopherd +. /lib/lsb/init-functions case $1 in start)