วิธีทำให้ No-ip รันทุกครั้งที่รีบูทเครื่อง
สร้างไฟล์ /etc/rc.d/init.d/noip จากข้อความในกรอบข้างล่างเสร็จแล้วสั่งchmod 755 /etc/rc.d/init.d/noipchkconfig –add noipchkconfig –level 3 noip on
อ้างถึง#!/bin/sh## chkconfig: 345 99 80# description: Starts and stops the no-ip.com Dynamic dns client daemon## pidfile: /var/run/noipd.pid## Written by serge@vanginderachter.be and tested on Redhat 8# … and debugged by Uwe Dippel# 29-03-2003## Source function library.if [ -f /etc/init.d/functions ] ; then. /etc/init.d/functionselif [ -f /etc/rc.d/init.d/functions ] ; then. /etc/rc.d/init.d/functionselseexit 0fi
# Avoid using root’s TMPDIRunset TMPDIR
# Source networking configuration.. /etc/sysconfig/network
# Check that networking is up.[ ${NETWORKING} = "no" ] && exit 0
RETVAL=0
start() {if [ -f /var/run/noipd.pid ] ; thenecho “no-ip client daemon already started” && exit 0fiecho -n $”Starting no-ip client daemon: ”daemon /usr/local/bin/noip2echoRETVAL=$?/sbin/pidof noip2 > /var/run/noipd.pid}
stop() {if [ -f /var/run/noipd.pid ] ; thenecho -n $”Stopping no-ip client daemon: ”killproc noip2 -TERMechoRETVAL=$?rm -f /var/run/noipd.pidelseecho “no-ip client daemon is not running” && exit 0fireturn $RETVAL}
restart() {stopstart}
case “$1″ instart)start;;stop)stop;;restart)restart;;*)echo $”Usage: $0 {startstoprestart}”exit 1esac
exit $?
สมัครสมาชิก:
ส่งความคิดเห็น (Atom)
ไม่มีความคิดเห็น:
แสดงความคิดเห็น