diff options
author | garhve <git@garhve.com> | 2022-12-05 19:43:39 +0800 |
---|---|---|
committer | garhve <git@garhve.com> | 2022-12-05 19:43:39 +0800 |
commit | c6bc541ab58363d783e60a007e80e9bf9e231fda (patch) | |
tree | a59c7ed0d05225c5876f3e5e919d4f6ed0c447ff /bash/update_bt.sh |
initialize
Diffstat (limited to 'bash/update_bt.sh')
-rwxr-xr-x | bash/update_bt.sh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/bash/update_bt.sh b/bash/update_bt.sh new file mode 100755 index 0000000..5023308 --- /dev/null +++ b/bash/update_bt.sh @@ -0,0 +1,13 @@ +#! /bin/sh + +site=https://raw.githubusercontent.com/ngosang/trackerslist/master/trackers_all.txt + +file=/home/pi/aria2-config/aria2.conf + +Addr=pi@192.168.1.104 + +current="bt-tracker=$(curl $site | tr -s '[:space:]' | tr '[:space:]' ',')" + + +#sshpass -p 'cctv7701' ssh -T $Addr "sed -i 's|$(grep -A 1 bt-trackers $file)|'\"${current}\"'|' $file" +$(sshpass -p 'cctv7701' ssh -T $Addr "sed -i '410d' $file | echo $current >> $file") |