summaryrefslogtreecommitdiff
path: root/bash/update_bt.sh
diff options
context:
space:
mode:
Diffstat (limited to 'bash/update_bt.sh')
-rwxr-xr-xbash/update_bt.sh13
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")