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 ...
随机推荐
- windows下利用OpenVPN搭建VPNserver
一.OpenVPN是一款功能强大,可跨平台(支持Win 2000/XP/2003, Linux, Mac OS X, Solaris, FreeBSD, NetBSD, 和 OpenBSD)使用的SS ...
- 随记一个C的毫秒级群PING
正好公司为了检测前台网络,力图收集有力证据与某CDN PK,所以随手写了一个群PING的程序. 写的内容比较简单,没有去特别追求线程效率,也没有去用LINUX 2.6+的殿堂级神器,以追求实现效率为主 ...
- iOS开发的一些奇巧淫技2
能不能只用一个pan手势来代替UISwipegesture的各个方向? - (void)pan:(UIPanGestureRecognizer *)sender { typedef NS_ENUM(N ...
- jQuery整理您的笔记----jQuery开始
Jquery它是一种高速.简明的JavaScript相框,jQuery设计目标:Write Less,Do More(写更少的代码,做很多其他的事情). 一.Jquery框架优势: 1.轻量级 jQu ...
- 砸金蛋:jQuery+PHP实现的砸金蛋中奖程序
原文 砸金蛋:jQuery+PHP实现的砸金蛋中奖程序 砸金蛋被广泛应用于庆典活动.商家促销.电视娱乐等场合,它的趣味.悬念能迅速活跃现场气氛.同样,我们也可以将砸金蛋应用到WEB网站上,用于开展线上 ...
- Asp.Net MVC4 + Oracle + EasyUI + Bootstrap
Asp.Net MVC4 + Oracle + EasyUI + Bootstrap --操作数据和验证 本文链接:http://www.cnblogs.com/likeli/p/4234238.ht ...
- 原生js写的一个弧形菜单插件
弧形菜单是一种半弧式或者全弧形菜单,是一种不同于传统横向或者竖向菜单形式的菜单.最近在网上看到好多人写出了这种效果,于是也尝试自己写了一个. 实现方式:原生态js 主要结构: 1.参数合并 var d ...
- jQuery圆形统计图实战开发
今天我给大家介绍一款圆形统计图circliful,它基于HTML5的画布和jQuery,无需使用图像轻松实现圆形统计图,而且有很多属性设置,使用起来非常方便. 首先我们需要将jquery库文件和jqu ...
- 【转】Android的Merge讲解与实例
原文:http://blog.sina.com.cn/s/blog_62f987620100sf13.html 单独将<merge />标签做个介绍,是因为它在优化UI结构时起到很重要的作 ...
- java中数据库通用层
/** * 数据库通用类 * */ public class ConnDB { /** * 获取数据库连接对象 * @return 数据库连接对象 * */ public static Connect ...