From 0b714cdb07b31fea1693b3ed02de4db5f7665d4b Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Wed, 23 Mar 2011 09:21:32 +0100 Subject: [PATCH] a template for bash initscripts --- plugins/initscript-template.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 plugins/initscript-template.sh 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 -- 2.43.0