Skip to content

Instantly share code, notes, and snippets.

@p1nox
Last active March 5, 2018 02:24
Show Gist options
  • Save p1nox/3cff4c7e986f9aabd3634d78000e7d61 to your computer and use it in GitHub Desktop.
Save p1nox/3cff4c7e986f9aabd3634d78000e7d61 to your computer and use it in GitHub Desktop.
NoIp install and config

Install

    sudo apt-get install build-essential
    cd /usr/local/src
    wget http://www.no-ip.com/client/linux/noip-duc-linux.tar.gz
    tar xzf noip-duc-linux.tar.gz
    cd no-ip-2.1.9
    make
    make install

Config

  • Create file vim /etc/init.d/noip2
#! /bin/sh
# /etc/init.d/noip2

# Supplied by no-ip.com
# Modified for Debian GNU/Linux by Eivind L. Rygge <[email protected]>
# Updated by David Courtney to not use pidfile 130130 for Debian 6.
# Updated again by David Courtney to "LSBize" the script for Debian 7.

### BEGIN INIT INFO
# Provides:     noip2
# Required-Start: networking
# Required-Stop:
# Should-Start:
# Should-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start noip2 at boot time
# Description: Start noip2 at boot time
### END INIT INFO

# . /etc/rc.d/init.d/functions  # uncomment/modify for your killproc

DAEMON=/usr/local/bin/noip2
NAME=noip2

test -x $DAEMON || exit 0

case "$1" in
    start)
    echo -n "Starting dynamic address update: "
    start-stop-daemon --start --exec $DAEMON
    echo "noip2."
    ;;
    stop)
    echo -n "Shutting down dynamic address update:"
    start-stop-daemon --stop --oknodo --retry 30 --exec $DAEMON
    echo "noip2."
    ;;

    restart)
    echo -n "Restarting dynamic address update: "
    start-stop-daemon --stop --oknodo --retry 30 --exec $DAEMON
    start-stop-daemon --start --exec $DAEMON
    echo "noip2."
    ;;

    *)
    echo "Usage: $0 {start|stop|restart}"
    exit 1
esac
exit 0
  • Set and start:
chmod a+x /etc/init.d/noip2
update-rc.d noip2 defaults
service noip2 start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment