summaryrefslogtreecommitdiffstats
path: root/syssrv
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2012-10-26 21:27:55 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2012-10-26 21:27:55 +0200
commitffb505e9a098ba2ca3c385091fdaf1c11590c122 (patch)
tree224f4c3e24db600865e86b35561cf9589081f8bd /syssrv
parent8916662b60656d4995ee166ac13075725a11b86b (diff)
downloadbin-ffb505e9a098ba2ca3c385091fdaf1c11590c122.zip
bin-ffb505e9a098ba2ca3c385091fdaf1c11590c122.tar.gz
add syssrv: systemctl start/stop *.service
Diffstat (limited to 'syssrv')
-rwxr-xr-xsyssrv12
1 files changed, 12 insertions, 0 deletions
diff --git a/syssrv b/syssrv
new file mode 100755
index 0000000..c995153
--- /dev/null
+++ b/syssrv
@@ -0,0 +1,12 @@
+#! /bin/sh
+
+if [ $# -lt 2 ]; then
+ echo "usage: $0 on|off service" && exit 1
+fi
+if [ "$1" = "on" ]; then
+ systemctl start $2.service
+elif [ "$1" = "off" ]; then
+ systemctl stop $2.service
+else
+ echo "usage: $0 on|off service" && exit 1
+fi