This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
tokens="123456789" | |
URL="https://dynv6.com/api/v2" | |
historyFile="$HOME/.dynv6.addr6" | |
zone="helloworld.dynv6.net" | |
# name="example" #用于zone内的记录 | |
adapterName="Ethernet" | |
if [ -r "$historyFile" ]; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
dir="$HOME/Documents/" | |
cd "$dir" | |
info=$(df -h "$dir") | |
free=$(echo "$info" | awk '{print $4}' | sed -e "1d") | |
total=$(echo "$info" | awk '{print $2}' | sed -e "1d") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# ESXi远程自动化常用命令 | |
# rm -f ./backup/rui.crt ./backup/rui.key # 删除旧的备份证书 | |
# scp root@esxi:/etc/vmware/ssl/rui.key root@esxi:/etc/vmware/ssl/rui.crt ./backup/ # 备份现有证书 | |
# scp ./rui.crt ./rui.key root@esxi:/etc/vmware/ssl/ ## 复制证书 | |
# ssh root@esxi "/bin/services.sh restart" ## 重启管理服务 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## 检测ESXi版本 升级ESXi一体化 | |
## -h 显示帮助信息 | |
## -v 显示ESXi版本 | |
## -u 升级,后接包路径 | |
## 参数列表 | |
ESXiServer="10.10.10.10" ## ESXi主机地址(ip或者域名) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
tokens="" | |
URL="https://dynv6.com/api/v2" | |
zone="" | |
name="" | |
historyFile=".iphistory" | |
ESXiServer="192.168.1.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
### ESXi主机证书更新脚本,附带邮件通知以及Telegram提示与备份 | |
### 作用于acme.sh的reloadcmd命令 | |
### 使用前需更改参数 | |
targetKeyPath="/etc/vmware/ssl/rui.key" | |
targetCertPath="/etc/vmware/ssl/rui.crt" | |
sourceKeyPath="/home/ubuntu/install.key" | |
sourceCertPath="/home/ubuntu/install.crt" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
botToken="" | |
chatId="" | |
acmePath="/root/.acme.sh/acme.sh" | |
acmeResult="$($acmePath --list)" | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# checksum.sh "/path/to/target/dir" | |
dir="$1" | |
cd "$dir" | |
# file=$(ls "$dir") | |
file=$(ls) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# 生成Windows导入证书所需的pfx文件 | |
sourceKeyPath="/path/to/key" | |
sourceCertPath="/path/to/cert" | |
workDir="/outputdir" | |
pkcs12Password="P@ssword" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
token="token" | |
hostname="exmple.example.com" | |
device="eth0" | |
file=$HOME/.iphistory_henet | |
[ -e $file ] && old=`cat $file` | |
if [ -z "$netmask" ]; then |
OlderNewer