Used sequpgrade.sh to upgrade existing seqs

This commit is contained in:
2022-05-29 20:58:23 +02:00
parent 10ee4198f0
commit 6214493c18
57 changed files with 802 additions and 806 deletions

View File

@@ -17,20 +17,20 @@ SCRIPT_NAME=${SCRIPT_NAME%%.*}
CONFIG_FILE_NAME="${SCRIPT_NAME}.cfg"
CONFIG_FILE_TEMPLATE="$WDIR/${CONFIG_FILE_NAME}.example"
step_config() {
seq_config() {
initSeqConfig "$CONFIG_FILE_NAME" "$CONFIG_FILE_TEMPLATE"
if [ $? -eq 0 ] ; then
CONFIG=1
else
# End if no configuration file exists
[ $DRY -eq 0 ] && return 1
dry || return 1
fi
[ $QUIET -ne 0 ] && APTOPT="-y"
quiet && APTOPT="-y"
return 0
}
step_1_info() { echo "Install $toolName"; }
step_1_alias() { ALIAS="install"; }
step_1_alias() { echo "install"; }
step_1() {
exe apt update
exe apt install $toolDeps $APTOPT
@@ -42,7 +42,7 @@ step_1() {
}
step_10_info() { echo "Setup blocklist update cron job"; }
step_10_alias() { ALIAS="bllupdate"; }
step_10_alias() { echo "bllupdate"; }
step_10() {
addConf -s "$TRDA_REMOTE_AUTH" "$TRDA_REMOTE_AUTH_LOC"
[ $? -eq 0 ] && exe chmod 600 "$TRDA_REMOTE_AUTH_LOC"
@@ -51,7 +51,7 @@ step_10() {
}
step_11_info() { echo "Setup remote authentication for current user (~/.netrc)"; }
step_11_alias() { ALIAS="netrcauth"; }
step_11_alias() { echo "netrcauth"; }
step_11() {
local lRemoteAuth="$(realpath ~/.netrc)"
if [ ! -f "$lRemoteAuth" ]; then
@@ -61,7 +61,7 @@ step_11() {
}
step_12_info() { echo "Add ufw rules for rpc and peer port (default 9091 and 51413)"; }
step_12_alias() { ALIAS="ufw"; }
step_12_alias() { echo "ufw"; }
step_12() {
local trdaRpcPort=9091
exe ufw allow in on eth0 to any port $trdaRpcPort proto tcp comment "Transmission rpc"
@@ -70,9 +70,9 @@ step_12() {
}
step_20_info() { echo "Configuration notes"; }
step_20_alias() { ALIAS="notes"; }
step_20_alias() { echo "notes"; }
step_20() {
outColor green
color green
cat <<NOTES_EOF
[I] Change rpc password
1) Make sure $toolName service is stopped before editing the configuration file.
@@ -112,32 +112,32 @@ NOTES_EOF
}
step_50_info() { echo "List all available torrents"; }
step_50_alias() { ALIAS="list"; }
step_50_alias() { echo "list"; }
step_50() {
step netrcauth
outColor green
color green
exe "$toolRemote" -l
}
step_52_info() { echoinfoArgs "<TORRENT ID>"; echo "List information about a torrent"; }
step_52_alias() { ALIAS="info"; }
step_52_alias() { echo "info"; }
step_52() {
shift
endCheckEmpty 1 "Id must not be empty"
step netrcauth
outColor green
color green
exep "\"$toolRemote\" -t$1 -i | less"
}
step_54_info() { echo "$toolName status"; }
step_54_alias() { ALIAS="status"; }
step_54_alias() { echo "status"; }
step_54() {
step netrcauth
outColor green
color green
exe "$toolRemote" -si
exe "$toolRemote" -st
}
VERSION_SEQREV=13
readonly sqr_minVersion=16
. /usr/local/bin/sequencer.sh