mirror of
https://github.com/troglobit/finit.git
synced 2026-10-20 11:19:35 +00:00
Add service wrapper script, sometimes more convenient to use
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
ff95ca92b1
commit
dc9d0b6fca
2 files changed
+34
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user