Used sequpgrade.sh to upgrade existing seqs
This commit is contained in:
@@ -6,7 +6,7 @@ toolUser=aria2
|
||||
|
||||
# Get script working directory
|
||||
# (when called from a different directory)
|
||||
WDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >>/dev/null 2>&1 && pwd)"
|
||||
WDIR="$(cd "$(dirname -- "${BASH_SOURCE[0]}")" >>/dev/null 2>&1 && pwd)"
|
||||
CONFIG=0
|
||||
SCRIPT_NAME=$(basename -- $0)
|
||||
SCRIPT_NAME=${SCRIPT_NAME%%.*}
|
||||
@@ -15,7 +15,7 @@ CONFIG_FILE_TEMPLATE="$WDIR/${CONFIG_FILE_NAME}.example"
|
||||
|
||||
aptOpt=
|
||||
|
||||
step_config() {
|
||||
seq_config() {
|
||||
#echo "Called once before executing steps."
|
||||
## e.g. to source a config file manually:
|
||||
#. "$CONFIG_FILE"
|
||||
@@ -27,14 +27,14 @@ step_config() {
|
||||
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
|
||||
@@ -54,11 +54,11 @@ ariaConfLoc="/etc/aria2/aria2.conf"
|
||||
|
||||
|
||||
step_3_info() { echo "Create $toolName service"; }
|
||||
step_3_alias() { ALIAS="service"; }
|
||||
step_3_alias() { echo "service"; }
|
||||
step_3() {
|
||||
addConf -s "$ariaService" "$ariaServiceLoc"
|
||||
exe systemctl daemon-reload
|
||||
echoseq " [I] Serive not started or enabled"
|
||||
info "Service not started or enabled"
|
||||
}
|
||||
ariaServiceLoc="/etc/systemd/system/aria2.service"
|
||||
ariaService="[Unit]
|
||||
@@ -76,10 +76,11 @@ Restart=on-failure
|
||||
WantedBy=multi-user.target"
|
||||
|
||||
step_10_info() { echo "Add ufw rule for rpc port 6800"; }
|
||||
step_10_alias() { ALIAS="ufw"; }
|
||||
step_10_alias() { echo "ufw"; }
|
||||
step_10() {
|
||||
exe ufw allow in on eth0 to any port 6800 proto tcp comment "Aria2 rpc"
|
||||
}
|
||||
|
||||
VERSION_SEQREV=12
|
||||
readonly sqr_minVersion=16
|
||||
. /usr/local/bin/sequencer.sh
|
||||
|
||||
|
Reference in New Issue
Block a user