haugene-Transmission-openvpn 사용중인 유저입니다.
T#사용중에는 몰랐으나...
직접 토렌트 파일을 넣으니... 다운로드 완료 후, 토렌트 파일이 자동삭제가 안되고 있습니다.
검색을 좀 해보니 자동 스크립트를 만들어야 하는 것 같은데...
자동 스크립트 어덯게 만드나요?
setting.json(?) 여기에서도 스크립트 파일명인가? 넣는거 같은데...
어덯게 하는지 방법 좀 부탁드립니다.
도커로 트랜스 미션 두개를 돌리고 있습니다. 두개 모두 사용할려면 두 폴더에 있는 setting.json(?) 을 수정만 하면 될까요?
“script-torrent-done-enabled”: true
“script-torrent-done-filename”: "스크립트의 경로",
스크립트는 인터넷에서 참고해서 사용하고 있습니다.
#!/bin/bash
# port, username, password 수정
SERVER="localhost:port --auth username:password"
# use transmission-remote to get torrent list from transmission-remote list
TORRENTLIST=`transmission-remote $SERVER --list | sed -e '1d' -e '$d' | awk '{print $1}' | sed -e 's/[^0-9]*//g'`
# for each torrent in the list
for TORRENTID in $TORRENTLIST
do
INFO=$(transmission-remote $SERVER --torrent $TORRENTID --info)
echo -e "Processing #$TORRENTID - $(echo $INFO | sed -e 's/.*Name: \(.*\) Hash.*/\1/')"
FILENAME=`echo $INFO | sed -e 's/.*Name: \(.*\) Hash.*/\1/'`
echo $FILENAME
# check if torrent download is completed
DL_COMPLETED=`echo $INFO | grep "Done: 100%"`
# check torrents current state is
STATE_STOPPED=`echo $INFO | grep "State: Seeding\|State: Stopped\|State: Finished\|State: Idle"`
# if the torrent is "Stopped", "Finished", or "Idle after downloading 100%"
if [ "$DL_COMPLETED" ] && [ "$STATE_STOPPED" ]; then
echo "Torrent #$TORRENTID is completed. Removing torrent from list."
transmission-remote $SERVER --torrent $TORRENTID --remove
# 텔레그램 전송 -- bot토큰 챗id 수정
curl -i -X GET https://api.telegram.org/bot토큰/sendMessage -d type=note --data-urlencode chat_id=챗id --data-urlencode text="$FILENAME downloaded" --insecure
else
echo "Torrent #$TORRENTID is not completed. Ignoring."
fi
done
https://parksj0531.tistory.com/8
사이트 참조해서 했어요.