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

@@ -16,7 +16,7 @@ SCRIPT_NAME=${SCRIPT_FILE%%.*}
CONFIG_FILE_NAME="${SCRIPT_NAME}.cfg"
CONFIG_FILE_TEMPLATE="$WDIR/${CONFIG_FILE_NAME}.example"
step_config() {
seq_config() {
#echo "Called once before executing steps."
## e.g. to source a config file manually:
#. "$CONFIG_FILE"
@@ -28,14 +28,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
@@ -47,7 +47,7 @@ step_10_info() {
echoinfo " -l : Always output update required and error information"
echoinfo " (even with -qq)"
}
step_10_alias() { ALIAS="updateip"; }
step_10_alias() { echo "updateip"; }
step_10() {
exitIfRunning
shift
@@ -56,7 +56,7 @@ step_10() {
local ipRegex='^[0-2]*[0-9]{1,2}\.[0-2]*[0-9]{1,2}\.[0-2]*[0-9]{1,2}\.[0-2]*[0-9]{1,2}\/*[0-9]*$'
local dnsUrl="46.182.19.48" #digitalcourage.de/support/zensurfreier-dns-server
local dnsFallbackUrl="194.150.168.168" #dns.as250.net; Berlin/Frankfurt
local lecho="echoseq"
local lecho="info"
if [ "$1" == "-l" ]; then
lecho="echo"
shift
@@ -88,23 +88,23 @@ step_10() {
$lecho "[$(date)] [I] Restarting $toolName"
exe /bin/systemctl restart $toolServiceName
else
echoseq "[$(date)] [I] No update required (via $ipUpdater). Current ip: $confIp"
info "[$(date)] [I] No update required (via $ipUpdater). Current ip: $confIp"
fi
}
step_12_info() { echo "Setup public ip update cron job every 5 minutes"; }
step_12_alias() { ALIAS="cronip"; }
step_12_alias() { echo "cronip"; }
step_12() {
echoseq " [I] Setup $ipCronLoc"
info "Setup $ipCronLoc"
addConf -s "$ipCron" "$ipCronLoc"
}
ipCronLoc="/etc/cron.d/update_public_ip"
ipCron="*/5 * * * * root $WDIR/$SCRIPT_FILE -qq updateip"
step_100_info() { echo "Installation notes"; }
step_100_alias() { ALIAS="notes"; }
step_100_alias() { echo "notes"; }
step_100() {
outColor green
color green
cat <<COTURN_EOF
# Port forwarding
@@ -130,5 +130,5 @@ chmod g+r /etc/letsencrypt/archive/\$LOC_DOMAIN/privkey*
COTURN_EOF
}
VERSION_SEQREV=13
readonly sqr_minVersion=16
. /usr/local/bin/sequencer.sh