Created
June 2, 2016 03:19
-
-
Save jorke/18d5bcc10f8da01505d446ddbbde6208 to your computer and use it in GitHub Desktop.
This file contains hidden or 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/sh | |
# /etc/init.d/foobar | |
# The following part always gets executed. | |
echo "This part always gets executed" | |
# The following part carries out specific functions depending on arguments. | |
case "$1" in | |
start) | |
echo "Starting foobar" | |
echo "foobar is alive" | |
;; | |
stop) | |
echo "Stopping foobar" | |
echo "foobar is dead" | |
;; | |
*) | |
echo "Usage: /etc/init.d/foobar {start|stop}" | |
exit 1 | |
;; | |
esac | |
exit 0 |
Author
jorke
commented
Jun 2, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment