#!/sbin/runscript # Copyright 2013 Alpine Linux # Distributed under the terms of the GNU General Public License v2 extra_stopped_commands="setup" depend() { use net need localmount } setup() { ebegin "Setting up ${SVCNAME}" cd /var/lib/atheme-iris python ./clean.py python ./compile.py echo "atheme-iris has been compiled succesfully." echo "Now you can start the daemon with /etc/init.d/atheme-iris start" eend $? } start() { ebegin "Starting ${SVCNAME}" if [ -f /var/lib/atheme-iris/.compiled ]; then cd ${SVCHOME} nohup python ./run.py ${ARGS} &>/dev/null & else eerror "You must first run /etc/init.d/atheme-iris setup" fi setup() eend $? } stop() { ebegin "Stopping ${SVCNAME}" if [ -f /var/run/atheme-iris/atheme-iris.pid ]; then kill $(cat /var/run/atheme-iris/atheme-iris.pid) else eerror "atheme-iris is not running." fi eend $? }