Correction : {host,local,remote}/ : duplicity + MySQL.
[lhc/ateliers.git] / local / insserv-remove
diff --git a/local/insserv-remove b/local/insserv-remove
new file mode 100755 (executable)
index 0000000..624858d
--- /dev/null
@@ -0,0 +1,11 @@
+#!/bin/sh -eu
+# SYNTAX: $sv
+tool=$(readlink -e "${0%/*}/..")
+. "$tool"/local/lib.sh
+
+sv="$1"
+#sudo chmod u+x /etc/init.d/"$sv"
+sudo insserv --force --remove "$sv"
+sudo test ! -x /etc/init.d/"$sv" ||
+sudo /etc/init.d/"$sv" stop
+sudo chmod ugo-x /etc/init.d/"$sv"