miau: move initscript to src/initscripts/packages and use new macro

Signed-off-by: Jonatan Schlag <jonatan.schlag@ipfire.org>
This commit is contained in:
Jonatan Schlag
2017-03-03 16:35:36 +01:00
parent a5754e5da1
commit 7e8a2556e5
2 changed files with 4 additions and 0 deletions

View File

@@ -0,0 +1,47 @@
#!/bin/sh
########################################################################
# Begin $rc_base/init.d/miau
#
# Description : This is a script that starts miau as deamon
#
# Authors : Schantl Stefan (Stevee@ipfire.org)
#
# Version : 01.00
#
# Notes :
#
########################################################################
. /etc/sysconfig/rc
. ${rc_functions}
case "${1}" in
start)
boot_mesg "Starting miau - another IRC-bouncer/proxy..."
chown -R nobody.nobody /opt/miau
loadproc sudo -u nobody /opt/miau/bin/miau -d /opt/miau/config > /dev/null
evaluate_retval
;;
stop)
boot_mesg "Stopping miau - another IRC-bouncer/proxy..."
killproc /opt/miau/bin/miau
;;
restart)
${0} stop
sleep 1
${0} start
;;
status)
statusproc /opt/miau/bin/miau
;;
*)
echo "Usage: ${0} {start|stop|restart|status}"
exit 1
;;
esac
# End $rc_base/init.d/miau