Skip to content

Instantly share code, notes, and snippets.

View isjerryxiao's full-sized avatar
⛑️
moving bricks

Jerry Xiao isjerryxiao

⛑️
moving bricks
View GitHub Profile
@isjerryxiao
isjerryxiao / dnspod.sh
Last active February 3, 2017 08:52
重要:已经放弃更新,请使用 https://github.com/SYHGroup/easy_shell/blob/master/ddns/dnspod-ddns.sh ---------------------dnspod.cn服务器ip更新脚本(使用dnspod ddns api,可更改ttl),需要bash,curl,grep,sed,不建议在openwrt使用。使用时修改以下信息:TokenID、Token、ddnspod your domain.com.----------rm dnspod.sh && wget --no-cache https://gist.githubusercontent.com/Jerry981028/215df9be2b513962c4aedf7d…
#!/usr/bin/env bash
#encoding=utf8
function logecho(){
#若不需要记录日志注销下行。
echo "$*" >> ${logfile}
echo "$*"
}
function ddnspod(){
# Usage: ddnspod [subdomain] [domain]
if [ $# == 2 ]
#!/usr/bin/env bash
#encoding=utf8
rootpath="/root"
openwrtpath=$rootpath"/files/openwrt/OpenWrt-SDK-15.05.1-ar71xx-nand_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64/"
cd $rootpath
date
function Updatemotd(){
apt update 2>&1 | sed -n '$p' > /etc/motd
RESULT=`certbot renew | grep "No renewals were attempted."`
if [ "$RESULT" == "No renewals were attempted." ]