Skip to content

Instantly share code, notes, and snippets.

@xerox-xeon
Created July 4, 2020 09:22
Show Gist options
  • Select an option

  • Save xerox-xeon/fcab7d599bbce5e3a0b58357956f582e to your computer and use it in GitHub Desktop.

Select an option

Save xerox-xeon/fcab7d599bbce5e3a0b58357956f582e to your computer and use it in GitHub Desktop.
#!/bin/bash
# chkconfig: 2345 20 80
# description: Description comes here....
# Source function library.
. /etc/init.d/functions
start() {
# code to start app comes here
# example: daemon program_name &
}
stop() {
# code to stop app comes here
# example: killproc program_name
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
start
;;
status)
# code to check status of app comes here
# example: status program_name
;;
*)
echo "Usage: $0 {start|stop|status|restart}"
esac
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment