Using this tool -> inadyn

apt-get 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 you have to create (or edit) inadyn configuration file:

$~ mkdir /var/cache/inadyn

Edit this file:

/etc/inadyn.conf

this way

Code:
# Basic configuration file for inadyn
#
# /etc/inadyn.conf
#update_period_sec # Check for a new IP every seconds
background
verbose
period
cache-dir /var/cache/inadyn
startup-delay
logfile /var/log/ddns.log
pidfile /var/run/ddns.pid    system default@freedns.afraid.org
ssl
username abcdefsafdsa
password fdadfferfsadf
alias oneofyour.donated.com
alias another.tooms.to
 

Now put this code in /etc/init.d/inadyn

Code:
#!/bin/bash
case "$1" in
start)
if [ -f /tmp/inadyn.pid ]; then
PID=$(cat /tmp/inadyn.pid)
kill - ${PID} &>/dev/null
if [ $? = ]; then
echo "Inadyn is already running."
else
/usr/sbin/inadyn
pidof inadyn > /tmp/inadyn.pid
PID=$(cat /tmp/inadyn.pid)
kill - ${PID} &>/dev/null
if [ $? = ]; then
echo "Inadyn started succesfully."
else
echo "Error starting Inadyn"
fi
fi
else
/usr/sbin/inadyn
pidof inadyn > /tmp/inadyn.pid
PID=$(cat /tmp/inadyn.pid)
kill - ${PID} &>/dev/null
if [ $? = ]; then
echo "Inadyn started succesfully."
else
echo "Error starting Inadyn"
fi
fi
;;
stop)
if [ -f /tmp/inadyn.pid ];then
PID=$(cat /tmp/inadyn.pid)
kill - ${PID} &>/dev/null
if [ $? = ]; then
/bin/kill ${PID}
kill - ${PID} &>/dev/null
if [ $? = ]; 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)
$ stop
$ start
;;
*)
echo "Usage: $0 start|stop|restart|reload"
exit
esac
exit

Then create these two links to start and stop service at system boot and shutdown:

ln -s /etc/init.d/inadyn /etc/rc2.d/S03inadyn
ln -s /etc/init.d/inadyn /etc/rc0.d/K03inadyn
 

Then you can use:

service inadyn start

DDNS client on a Linux machine的更多相关文章

  1. Deploying OpenFire for IM (instant message) service (TCP/IP service) with database MySQL , client Spark on linux部署OpenFire IM 消息中间件服务

    Are you a hacker? How to build another QQ/Wechat/whatsapp/skype/imessage? Let's go through this!!!! ...

  2. VNCServer,SSH Secure Shell Client,window远程控制linux

    1.VNC远程连接linux图形化桌面 2.SSH Secure Shell Client连接linux终端 3.设置FTP与linux传输文件 1.VNC远程连接linux图形化桌面 在centos ...

  3. windows下使用 Secure Shell Client工具操作linux常用命令

    如果项目部署在linux系统上,而我们使用的是windows系统,那我们可以使用Secure Shell软件进行操作,那怎么使用它来操作tomcat呢? 1.  cd /usr/share/apach ...

  4. Xmpp integration with Asterisk

    http://gnu-linux.org/xmpp-integration-with-asterisk.html Xmpp stands for eXtensible Messaging and Pr ...

  5. Wmic-linux

    Description Windows Management Instrumentation Command-line (WMIC) uses Windows Management Instrumen ...

  6. (OK) Linux epoll模型—socket epoll server client chat

    http://www.cnblogs.com/venow/archive/2012/11/30/2790031.html http://blog.csdn.net/denkensk/article/d ...

  7. delphi 开发者 linux 实务(转)

    Linux Essentials for Delphi Developers   There is currently no way using Delphi to target Linux. Lon ...

  8. LoadRunner监控Linux

    rstat协议允许网络上的用户获得同一网络上各机器的性能参数. 需要下载3个包:    (1)rsh-0.17-14.i386.rpm     (2)rsh-server-0.17-14.i386.r ...

  9. Linux下安装使用NMON监控、分析系统性能

    背景:今天在LoadRunner11.0中使用rstat监控linux过程中,始终提示如下错: Monitor name :UNIX Resources. Cannot initialize the ...

随机推荐

  1. 猫学习IOS(十五)UI以前的热的打砖块游戏

    猫分享.必须精品 材料代号地址:http://blog.csdn.net/u013357243/article/details/44814523 原文地址:viewmode=contents" ...

  2. SSAS系列——【07】多维数据(查询Cube)

    原文:SSAS系列——[07]多维数据(查询Cube) 1.什么是MDX? MDX叫做"多维表达式",是一种查询语言,是一种和SQL类似的查询语言,它基于 XML for Anal ...

  3. BestCoder Round #11 (Div. 2) 题解

    HDOJ5054 Alice and Bob Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/O ...

  4. 动态创建一些常的html标签

    原文:动态创建一些常的html标签 一段时间来,不管是在学习还是应用asp.net mvc应用程序,较多情况之下,需要动态创建一些html标签.如这篇<文本框下面有两个铵钮,点就加点减就减> ...

  5. webkit的几个属性

    -webkit-text-size-adjust 1.当样式表里font-size<12px时,中文版chrome浏览器里字体显示仍为12px,这时可以用 html{-webkit-text-s ...

  6. Nginx均衡负载(IP_HASH)未生效

    由于公司业务的发展,单台服务器已经无法满足并发和用户的需求,所以只能通过水平拓展的方式加机器来解决,线上采用的是Nginx+Tomcat集群的方式来解决.由于当前业务量不是很大,而且由于之前代码的问题 ...

  7. ZA7783:MIPI转LVDS/MIPI转RGB888/RGB转LVDS

    在消费类电子越来越白热化阶段.好多设计project师已经開始慢慢关注到成本控制,小金在这里就给大家带来一颗转接IC.希望能帮助贵公司控制成本.当然性能也是可靠的,已经好多产品设计了. 多多不吝赐教 ...

  8. [转]Android图片下载

    因为国内被墙,看起来不方便,转载下,原文地址:http://android-developers.blogspot.com/2010/07/multithreading-for-performance ...

  9. 让大蛇(Python)帮你找工作

    前段时间用Python实现了一个网络爬虫(让大蛇(Python)帮你找工作),效率总体还可以,但是缺点就是每次都需要手动的去触发,于是打算对该爬虫加上Timer,经过网上一番搜索以及API的查询,发现 ...

  10. AngularJS and Asp.net MVC

    AngularJS 初印象------对比 Asp.net MVC 之前就早耳闻前端MVC的一些框架,微软自家的Knockout.js,google家的AngularJs,还有Backone.但未曾了 ...