Skip to content

Instantly share code, notes, and snippets.

View malagebidi's full-sized avatar
🎯
Focusing

DY malagebidi

🎯
Focusing
  • 20:56 (UTC +08:00)
View GitHub Profile
@malagebidi
malagebidi / aria2_tracker_update.sh
Last active January 8, 2022 03:07 — forked from leozhang2018/gist:3d348528f8f9c54be9d901f444b622a0
Auto update aria2 tracker from github
#!/bin/bash
#ref: https://github.com/ngosang/trackerslist
killall aria2c &>/dev/null
list=`wget -qO- https://ngosang.github.io/trackerslist/trackers_all_ip.txt|awk NF|sed ":a;N;s/\n/,/g;ta"`
if [ -z "`grep "bt-tracker" /etc/aria2/aria2.conf`" ]; then
sed -i '$a bt-tracker='${list} /etc/aria2/aria2.conf
#!/bin/sh
#获取当前时间
timestamp() {
date +"%s"
}
t=$(timestamp)
#获取huginn shell command agent每分钟写入的时间
modt=$(cat /tmp/huginn_unix.txt)