projects
/
projects.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3f3c6ab
)
epic-ts
author
Michael Wagner
<michael@wagnertech.de>
Wed, 18 Jul 2018 09:37:15 +0000
(11:37 +0200)
committer
Michael Wagner
<michael@wagnertech.de>
Wed, 18 Jul 2018 09:37:15 +0000
(11:37 +0200)
sh/sysd2sysv
[new file with mode: 0755]
patch
|
blob
diff --git a/sh/sysd2sysv
b/sh/sysd2sysv
new file mode 100755
(executable)
index 0000000..
47e3994
--- /dev/null
+++ b/
sh/sysd2sysv
@@ -0,0
+1,20
@@
+#!/bin/bash
+set -e
+
+if [ $# -ne 2 ]
+then
+ echo "usage: sysd2sysv <command> <deamon>"
+ exit 1
+fi
+
+if [ $1 = "enable" ]
+then
+ update-rc.d $2 defaults 100
+elif [ $1 = "disable" ]
+then
+ update-rc.d -f $2 remove
+else
+ /etc/init.d/$2 $1
+fi
+
+