All Downloads are FREE. Search and download functionalities are using the official Maven repository.

script.nix.tmpl.generic.sh Maven / Gradle / Ivy

There is a newer version: 1.1.1
Show newest version
#!/bin/sh
### BEGIN INIT INFO
# Provides:          #SERVICE_NAME#
# Required-Start:    $local_fs $remote_fs $network $syslog
# Required-Stop:     $local_fs $remote_fs $network $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Start/Stop #SERVICE_NAME#
### END INIT INFO
 
SERVICE_USER=#SERVICE_USER#
SERVICE_CTL=#CTLSCRIPT#

case "$1" in
start)
echo "Starting #SERVICE_NAME#..."
start-stop-daemon --start --background --chuid $SERVICE_USER --exec $SERVICE_CTL -- #START_ARG#
exit $?
;;
stop)
echo "Stopping #SERVICE_NAME#..."
 
start-stop-daemon --start --quiet --background --chuid $SERVICE_USER --exec $SERVICE_CTL -- #STOP_ARG#
exit $?
;;
log)
echo "Showing #SERVICE_NAME#.log..."
tail -500f #LOG_FILE_OUT#
;;
*)
echo "Usage: /etc/init.d/#SERVICE_NAME# {start|stop}"
exit 1
;;
esac
exit 0




© 2015 - 2024 Weber Informatics LLC | Privacy Policy