public
Created

Simple init script that is launch at the end of the boot process (example) for openSUSE or Fedora (compatible with systemd)

  • Download Gist
init_end_boot_script
Shell
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
#!/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

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.