Skip to content

Instantly share code, notes, and snippets.

@phoenixg
Created February 3, 2014 16:03
Show Gist options
  • Save phoenixg/8786685 to your computer and use it in GitHub Desktop.
Save phoenixg/8786685 to your computer and use it in GitHub Desktop.

Revisions

  1. phoenixg created this gist Feb 3, 2014.
    34 changes: 34 additions & 0 deletions noip.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,34 @@
    #! /bin/sh
    # /etc/init.d/noip

    ### BEGIN INIT INFO
    # Provides: noip
    # 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 noip"
    # run application you want to start
    /usr/local/bin/noip2
    ;;
    stop)
    echo "Stopping noip"
    # kill application you want to stop
    killall noip2
    ;;
    *)
    echo "Usage: /etc/init.d/noip {start|stop}"
    exit 1
    ;;
    esac

    exit 0