DDNS client on a Linux machine

Source: Internet
Author: User

Using This tool-Inadyn

Install inadyn-y

Usage:

Https://github.com/troglobit/inadyn#example-configuration

Suggested free DDNS providers:freedns.afraid.org, noip.com and etc.

Auto-startup script as a service

Knowledge from:http://www.linuxquestions.org/questions/linux-software-2/ how-do-i-execute-inadyn-automatically-during-boot-541367/

and

Init script for Inadyn First of all, there is a to create (or edit) inadyn configuration file:

$~ Mkdir/var/cache/inadyn

Edit This file:

/etc/inadyn.conf



This by

Code:
# Basic Configurationfile  forinadyn##/etc/inadyn.conf#update_period_sec -# Check forA new IP every -Secondsbackgroundverbose1period -Cache-dir/var/cache/inadynStartup-delay -logfile/var/log/Ddns.logpidfile/var/run/ddns.pid System [email protected]sslusername abcdefsafdsapassword Fdadfferfsadfalias Oneofyour.donated.comalias Another.tooms.to


Now put the This Code In/etc/init.d/inadyn

Code:
#!/bin/Bash Case " $" inchstart)if[-f/tmp/inadyn.pid]; ThenPID=$(Cat/tmp/inadyn.pid)Kill-0${pid} &>/dev/NULL        if[ $? =0]; Then            Echo "Inadyn is already running."        Else/usr/sbin/InadynpidofInadyn >/tmp/inadyn.pid pid=$(Cat/tmp/inadyn.pid)Kill-0${pid} &>/dev/NULL            if[ $? =0]; Then                Echo "Inadyn started succesfully."            Else                Echo "Error starting Inadyn"            fi        fi    Else/usr/sbin/InadynpidofInadyn >/tmp/inadyn.pid pid=$(Cat/tmp/inadyn.pid)Kill-0${pid} &>/dev/NULL        if[ $? =0]; Then            Echo "Inadyn started succesfully."        Else            Echo "Error starting Inadyn"        fi        fi        ;; Stop)if[-f/tmp/inadyn.pid]; ThenPID=$(Cat/tmp/inadyn.pid)Kill-0${pid} &>/dev/NULL        if[ $? =0]; Then/bin/Kill${pid}Kill-0${pid} &>/dev/NULL            if[ $? =1]; Then                Echo "Inadyn stopped succesfully."            Else                Echo "Error stopping Inadyn"            fi        Else            Echo "Inadyn is already stopped."        fi    Else        Echo "Inadyn is already stopped."    fi        ;; Reload|restart) $0Stop $0start;; *)        Echo "Usage: $ start|stop|restart|reload"Exit1EsacExit0

Then create these the-start and stop service at System boot and shutdown:
Ln -s/etc/init.d/inadyn/etc/rc2.d/s03inadynLn -s/etc/init.d/inadyn/etc/rc0.d/ K03inadyn

Then the can use:

Service Inadyn Start

DDNS client on a Linux machine

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.