DDNS client on a Linux machine
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/inadynEdit this file:
/etc/inadyn.confthis 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.toNow 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
exitThen 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的更多相关文章
- 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!!!! ...
- VNCServer,SSH Secure Shell Client,window远程控制linux
1.VNC远程连接linux图形化桌面 2.SSH Secure Shell Client连接linux终端 3.设置FTP与linux传输文件 1.VNC远程连接linux图形化桌面 在centos ...
- windows下使用 Secure Shell Client工具操作linux常用命令
如果项目部署在linux系统上,而我们使用的是windows系统,那我们可以使用Secure Shell软件进行操作,那怎么使用它来操作tomcat呢? 1. cd /usr/share/apach ...
- Xmpp integration with Asterisk
http://gnu-linux.org/xmpp-integration-with-asterisk.html Xmpp stands for eXtensible Messaging and Pr ...
- Wmic-linux
Description Windows Management Instrumentation Command-line (WMIC) uses Windows Management Instrumen ...
- (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 ...
- delphi 开发者 linux 实务(转)
Linux Essentials for Delphi Developers There is currently no way using Delphi to target Linux. Lon ...
- LoadRunner监控Linux
rstat协议允许网络上的用户获得同一网络上各机器的性能参数. 需要下载3个包: (1)rsh-0.17-14.i386.rpm (2)rsh-server-0.17-14.i386.r ...
- Linux下安装使用NMON监控、分析系统性能
背景:今天在LoadRunner11.0中使用rstat监控linux过程中,始终提示如下错: Monitor name :UNIX Resources. Cannot initialize the ...
随机推荐
- Hibeernate中的两种分页方式
1. return getHibernateTemplate().executeFind(new HibernateCallback() { public Object doInHibernate(S ...
- hdu1848 Fibonacci again and again(SG游戏功能)
现在的变化是看不清楚SG功能什么寻求方法 临时模板标题是首当 性能mex1它正在寻求g(x) 然后XOR #include<cstdio> #include<iostream> ...
- IOS开发-Swift新语言初见
Safe Swift pairs increased type safety with type inference, restricts direct access to pointers, and ...
- JS正则替换字符串
1.只替换第一次出现的字符: text.replace(/javascript/i, "JavaScript"); //正则用//来将正则包起来 i表示区分大小写 2.全局替换: ...
- R - 变化plot字形,嵌入字体以pdf
近期使用R绘图遇到两个问题 1. 使用不同的字体 2. 保存 plot 至 pdf 当字体嵌入pdf (embed the font) 使用extrafont和Ghostscript能够解决这两个问题 ...
- ASP.NET 5 Identity
ASP.NET 5 Identity “跌倒了”指的是这一篇博文:爱与恨的抉择:ASP.NET 5+EntityFramework 7 如果想了解 ASP.NET Identity 的“历史”及“ ...
- MPEG-DASH on IIS Practice in Action-attach
1. 准备 IIS Media Service已经安装准备好(如上),注意需要在2008上安装,2003安装不了,或者就算能安装也很麻烦 一个或多个码率的媒体文件如MP4已经准备好 DASH MPD ...
- Serv-U执行CMD命令
site exec + 命令.比如关机: site exec shutdown -r -t 0 注意,网上很多教程在前面加了一个“quote”,实测根本无效,不知道那些教材是怎么回事. 执行方式有很多 ...
- 使用sqlldr向Oracle导入大的文本(txt)文件
我们有多种方法可以向Oracle数据库里导入文本文件,但如果导入的文本文件过大,例如5G,10G的文本文件,有些方法就不尽如意了,例如PLSQL Developer中的导入文本功能,如果文本文件过大, ...
- Java集合之ArrayList源码分析
1.简介 List在数据结构中表现为是线性表的方式,其元素以线性方式存储,集合中允许存放重复的对象,List接口主要的实现类有ArrayList和LinkedList.Java中分别提供了这两种结构的 ...