More transmission monitoring steps
This commit is contained in:
@@ -5,6 +5,7 @@ toolDeps=transmission-daemon
|
|||||||
toolService=transmission-daemon
|
toolService=transmission-daemon
|
||||||
toolUser=debian-transmission
|
toolUser=debian-transmission
|
||||||
toolCronLoc="/etc/cron.d/transmission_daemon"
|
toolCronLoc="/etc/cron.d/transmission_daemon"
|
||||||
|
toolRemote="$(command -v transmission-remote)"
|
||||||
|
|
||||||
# Get script working directory
|
# Get script working directory
|
||||||
# (when called from a different directory)
|
# (when called from a different directory)
|
||||||
@@ -49,6 +50,16 @@ step_10() {
|
|||||||
addConf -s "$TRDA_CRON" "$toolCronLoc"
|
addConf -s "$TRDA_CRON" "$toolCronLoc"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
step_11_info() { echo "Setup remote authentication for current user (~/.netrc)"; }
|
||||||
|
step_11_alias() { ALIAS="netrcauth"; }
|
||||||
|
step_11() {
|
||||||
|
local lRemoteAuth="$(realpath ~/.netrc)"
|
||||||
|
if [ ! -f "$lRemoteAuth" ]; then
|
||||||
|
addConf -s "$TRDA_REMOTE_AUTH" "$lRemoteAuth"
|
||||||
|
[ $? -eq 0 ] && exe chmod 600 "$lRemoteAuth"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
step_12_info() { echo "Add ufw rules for rpc and peer port (default 9091 and 51413)"; }
|
step_12_info() { echo "Add ufw rules for rpc and peer port (default 9091 and 51413)"; }
|
||||||
step_12_alias() { ALIAS="ufw"; }
|
step_12_alias() { ALIAS="ufw"; }
|
||||||
step_12() {
|
step_12() {
|
||||||
@@ -100,5 +111,33 @@ net.core.wmem_max = 1048576
|
|||||||
NOTES_EOF
|
NOTES_EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
VERSION_SEQREV=12
|
step_50_info() { echo "List all available torrents"; }
|
||||||
|
step_50_alias() { ALIAS="list"; }
|
||||||
|
step_50() {
|
||||||
|
step netrcauth
|
||||||
|
outColor green
|
||||||
|
exe "$toolRemote" -l
|
||||||
|
}
|
||||||
|
|
||||||
|
step_52_info() { echo "List information about [TORRENT ID]"; }
|
||||||
|
step_52_alias() { ALIAS="info"; }
|
||||||
|
step_52() {
|
||||||
|
shift
|
||||||
|
endCheckEmpty 1 "Id must not be empty"
|
||||||
|
|
||||||
|
step netrcauth
|
||||||
|
outColor green
|
||||||
|
exep "\"$toolRemote\" -t$1 -i | less"
|
||||||
|
}
|
||||||
|
|
||||||
|
step_54_info() { echo "$toolName status"; }
|
||||||
|
step_54_alias() { ALIAS="status"; }
|
||||||
|
step_54() {
|
||||||
|
step netrcauth
|
||||||
|
outColor green
|
||||||
|
exe "$toolRemote" -si
|
||||||
|
exe "$toolRemote" -st
|
||||||
|
}
|
||||||
|
|
||||||
|
VERSION_SEQREV=13
|
||||||
. /usr/local/bin/sequencer.sh
|
. /usr/local/bin/sequencer.sh
|
||||||
|
Reference in New Issue
Block a user