Skip to content

Commit 0bc2c3a

Browse files
committed
优化
Signed-off-by: coffee <[email protected]>
1 parent b55e6b1 commit 0bc2c3a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tracker-add-auto-router.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,6 @@ while true ; do
4141
done
4242
# delete removed torrents record from record file
4343
for hash in $(awk '{print $1}' $record_file); do
44-
[[ $(transmission-remote "$host" --auth="$auth" --torrent "${torrent_hash}" --info | wc -l) -eq 0 ]] && sed -in $(grep -n $hash $record_file | awk -F ':' '{print $1}')'d' $record_file
44+
[[ $(transmission-remote "$host" --auth="$auth" --torrent "${torrent_hash}" --info | wc -l) -eq 0 ]] && sed -in $(grep -n $hash $record_file | head -n 1 | awk -F ':' '{print $1}')'d' $record_file
4545
done
4646
done

0 commit comments

Comments
 (0)