#! /bin/bash # # hellanzb Start the hellanzb. # Hellanzb can be run in two modes: # From CLI # As daemon # hellanzb.conf # A configuration file named hellanzb.conf must be present in the users .config directory for hellanzb to function properly. # # When run in daemon mode, the /etc/hellanzb.conf file needs to be modified to configure the user that will be running hellanzb # HELLANZB_USER="username" # HELLANZB_CONF="/home/${HELLANZB_USER}/.config/hellanzb.conf" NAME=hellanzb HELLAUSER=yourusernametorunhellanzbas trap "" 1 export LANG=C case "$1" in start) echo -ne "Starting $NAME" su -c '/usr/bin/screen -S $NAME -d -m /usr/bin/python /usr/bin/hellanzb > /dev/null 2> /dev/null' $HELLAUSER echo "." ;; stop) killall hellanzb.py echo "." ;; reload) echo "." ;; reload-modules) echo "." ;; restart) # $0 reload-modules $0 stop $0 start ;; force-reload) $0 reload-modules ;; *) echo "Usage: /etc/init.d/$NAME start|stop|reload|reload-modules|force-reload|restart}" exit 1 ;; esac exit 0