Skip to content

Instantly share code, notes, and snippets.

@chill117
Created July 6, 2014 18:47
Show Gist options
  • Save chill117/78876122c720ddd1cbb0 to your computer and use it in GitHub Desktop.
Save chill117/78876122c720ddd1cbb0 to your computer and use it in GitHub Desktop.
A simple bash script for starting/stopping/restarting an application or service.
#!/bin/bash
#
# A simple bash script for starting/stopping/restarting an application or service.
#
start()
{
# Your start application code goes here.
}
stop()
{
# Your stop application code goes here.
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
start
;;
*)
echo $"Usage: $0 {start|stop|restart}"
exit 1
esac
exit 0;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment