#!/bin/bash # Initscript for sBNC # Author: Axel 'shenziro' Hartwig
### Config ###
# Change UID/GID after starting to <uid|username>[:<gid:groupname>] CHANGEUIDGID="ircstuff:ircstuff"
# Path to the program (not the name of the executeable; no trailing slash) PROGPATH="/home/opt/sbnc1.3"
# Name of the executeable in $PROGPATH PROGEXEC="sbnc"
# Program parameters PROGPARAMS=""
# Name of the program (only used to display it during start/stop in this script) PROGNAME="sBNC"
### Script ###
function do_start { echo -n "Starting $PROGNAME: "
start-stop-daemon --start -c $CHANGEUIDGID -b -d $PROGPATH -x $PROGPATH/$PROGEXEC -- $PROGPARAMS
returnval=$? if [ $returnval == 0 ]; then echo "OK." else exit 1 fi }
function do_stop { echo -n "Stopping $PROGNAME: "
start-stop-daemon --stop -d $PROGPATH -x $PROGPATH/$PROGEXEC
case $1 in start) do_start ;; stop) do_stop ;; restart) do_stop do_start ;; *) echo "Usage: $0 {start|stop|restart}" >&2 exit 1 ;; esac
#!/bin/bash
# Initscript for sBNC
# Author: Axel 'shenziro' Hartwig
### Config ###
# Change UID/GID after starting to <uid|username> [:<gid: groupname> ] "ircstuff: ircstuff"
CHANGEUIDGID=
# Path to the program (not the name of the executeable; no trailing slash) "/home/ opt/sbnc1. 3"
PROGPATH=
# Name of the executeable in $PROGPATH
PROGEXEC="sbnc"
# Program parameters
PROGPARAMS=""
# Name of the program (only used to display it during start/stop in this script)
PROGNAME="sBNC"
### Script ###
function do_start {
echo -n "Starting $PROGNAME: "
if [ $returnval == 0 ]; then
else
fi
}
function do_stop {
echo -n "Stopping $PROGNAME: "
if [ $returnval == 0 ]; then
else
fi
}
case $1 in
do_start
do_stop
do_stop
do_start
echo "Usage: $0 {start| stop|restart} " >&2
exit 1
start)
;;
stop)
;;
restart)
;;
*)
;;
esac