From: Thierry Parmentelat Date: Wed, 23 Mar 2011 08:21:32 +0000 (+0100) Subject: a template for bash initscripts X-Git-Tag: nodemanager-2.0-32~10 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=0b714cdb07b31fea1693b3ed02de4db5f7665d4b;p=nodemanager.git a template for bash initscripts --- diff --git a/plugins/initscript-template.sh b/plugins/initscript-template.sh new file mode 100644 index 0000000..5b12e6f --- /dev/null +++ b/plugins/initscript-template.sh @@ -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