自動起動化
以下のファイルを /etc/init.d/noipとし、その後 chmod +x /etc/init.d/noip を実行
#! /bin/sh # # no-ip # # chkconfig: 2345 99 80 # # description: no-ip.com dynamic IP update client for Linux. case "$1" in start) echo "Starting noip." /usr/local/bin/noip2 ;; stop) echo -n "Shutting down " #killproc noip start-stop-daemon --user root --stop --quiet --oknodo --exec /usr/local/bin/noip2 echo "." ;; restart) $0 stop $0 start ;; *) echo "Usage: $0 {start|stop|restart}" exit 1 esac exit 0
あとは自動起動の為に
# update-rc.d noip defaults Adding system startup for /etc/init.d/noip ... /etc/rc0.d/K20noip -> ../init.d/noip /etc/rc1.d/K20noip -> ../init.d/noip /etc/rc6.d/K20noip -> ../init.d/noip /etc/rc2.d/S20noip -> ../init.d/noip /etc/rc3.d/S20noip -> ../init.d/noip /etc/rc4.d/S20noip -> ../init.d/noip /etc/rc5.d/S20noip -> ../init.d/noip
終了。