rendered paste bodystart() {
return 0
}
stop() {
return 0
}
reload() {
return 1
}
restart() {
stop
start
}
shutdown() {
return 0
}
help() {
cat <<EOF
Syntax: $0 [command]
Available commands:
start Start the service
stop Stop the service
restart Restart the service
reload Reload configuration files (or restart if that fails)
$EXTRA_HELP
EOF
}
init_service() {
local action="$1"
local cmds
for cmd in $EXTRA_COMMANDS; do
cmds="$cmd) $cmd;;"
done
eval "case \"\$action\" in
start) start;;
stop) stop;;
reload) reload || restart;;
restart) restart;;
$cmds
*) help;;
esac"
}