Pablo Marques wrote:
o script está assim:
#!/bin/bash
noip2
noip2 -C
noip2 -U 10
Não sei onde vc instalou o noip2, mas no meu foi pro
/usr/local/bin/noip2. Junto com .tar.gz que usei, veio esse arquivo,
foi só copiar no /etc/init.d/ e fazer o link.
:~/noip-2.1.1$ cat debian.noip2.sh
#! /bin/sh
# /etc/init.d/noip2.sh
# Supplied by no-ip.com
# Modified for Debian GNU/Linux by Eivind L. Rygge <eivind@rygge.org>
# . /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 --pidfile /var/run/noip2.pid \
--make-pidfile --exec $DAEMON
echo "noip2."
;;
stop)
echo -n "Shutting down dynamic address update:"
start-stop-daemon --stop --pidfile /var/run/noip2.pid \
--oknodo --retry 30 --exec $DAEMON
echo "noip2."
;;
restart)
echo -n "Restarting dynamic address update: "
start-stop-daemon --stop --pidfile /var/run/noip2.pid \
--oknodo --retry 30 --exec $DAEMON
start-stop-daemon --start --pidfile /var/run/noip2.pid \
--exec $DAEMON
echo "noip2."
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
exit 0