a template for bash initscripts
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Wed, 23 Mar 2011 08:21:32 +0000 (09:21 +0100)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Wed, 23 Mar 2011 08:21:32 +0000 (09:21 +0100)
plugins/initscript-template.sh [new file with mode: 0644]

diff --git a/plugins/initscript-template.sh b/plugins/initscript-template.sh
new file mode 100644 (file)
index 0000000..5b12e6f
--- /dev/null
@@ -0,0 +1,23 @@
+#!/bin/bash
+command=$1; shift
+slicename=$1; shift
+
+# that can make sense if needed
+# source /etc/init.d/functions
+
+function start () {
+    
+}
+function stop () {
+
+}
+function restart () {
+  stop
+  start
+}
+case $command in 
+start) start ;;
+stop) stop ;;
+restart) restart ;;
+*) echo "Unknown command in initscript $command for slice $slicename" ;;
+esac