Skip to content

Instantly share code, notes, and snippets.

@Technicus
Created August 14, 2014 21:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Technicus/5d1e851ef7ff9e62b24b to your computer and use it in GitHub Desktop.
Save Technicus/5d1e851ef7ff9e62b24b to your computer and use it in GitHub Desktop.
#! /bin/bash
# /etc/init.d/HeckBot
### BEGIN INIT INFO
# Provides: HeckBot
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Simple script to start a program at boot
# Description: A simple script from www.stuffaboutcode.com which will start / stop a program a boot / shutdown.
### END INIT INFO
# If you want a command to always run, put it here
# Carry out specific functions when asked to by the system
case "$1" in
start)
echo "Starting HeckBot"
supybot /home/pi/shopcam/ShopCam_01/Programming/RaspberryPi/IRC/supybot/HeckBot_03/HeckBot.conf
;;
stop)
echo "Stopping HeckBot"
# kill application you want to stop
killall supybot
;;
*)
echo "Usage: /etc/init.d/HeckBot {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