Created
July 20, 2012 12:48
-
-
Save jcberthon/3150553 to your computer and use it in GitHub Desktop.
Simple init script that is launch at the end of the boot process (example) for openSUSE or Fedora (compatible with systemd)
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/sh | |
### BEGIN INIT INFO | |
# Provides: nothing | |
# Required-Start: $all | |
# Default-Start: 3 5 | |
# Default-Stop: 4 | |
# Short-Description: single_line_description | |
# Description: multiline_description | |
### END INIT INFO | |
case "$1" in | |
start) | |
echo -n "Starting TEST daemon" | |
echo "Test" >> /var/tmp/test | |
;; | |
stop) | |
echo -n "Shutting down CRON daemon" | |
echo "Ciao..." >> /var/tmp/test | |
;; | |
*) | |
echo "Usage: $0 {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