Add service wrapper script, sometimes more convenient to use

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson
2017-12-31 17:08:35 +01:00
parent ff95ca92b1
commit dc9d0b6fca
2 changed files with 34 additions and 0 deletions
+1
View File
@@ -1,5 +1,6 @@
ACLOCAL_AMFLAGS = -I m4
SUBDIRS = plugins src
bin_SCRIPT = service
doc_DATA = README.md LICENSE contrib/finit.conf
EXTRA_DIST = README.md LICENSE ChangeLog.md contrib/finit.conf
Executable
+33
View File
@@ -0,0 +1,33 @@
#!/bin/sh
JOB=$1
CMD=$2
usage() {
echo "Usage: service [job# | name] <stop | start | restart | status | show>"
exit 1
}
if [ $# -eq 0 ]; then
initctl show
exit 0
fi
case $CMD in
stop)
;;
start)
;;
restart)
;;
status)
;;
show)
;;
*)
usage
;;
esac
initctl $2 $1