-
-
Save itsprdp/2b0a714d0a7a04f9c437 to your computer and use it in GitHub Desktop.
Sys V-init.d example. Equivalent to upstart
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/blah | |
# | |
# Some things that run always | |
touch /var/lock/blah | |
# Carry out specific functions when asked to by the system | |
case "$1" in | |
start) | |
echo "Starting script blah " | |
echo "Could do more here" | |
;; | |
stop) | |
echo "Stopping script blah" | |
echo "Could do more here" | |
;; | |
*) | |
echo "Usage: /etc/init.d/blah {start|stop}" | |
exit 1 | |
;; | |
esac | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment