Created
July 6, 2014 18:47
-
-
Save chill117/78876122c720ddd1cbb0 to your computer and use it in GitHub Desktop.
A simple bash script for starting/stopping/restarting an application or service.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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