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

@@ -8,8 +8,8 @@ phpName="php${phpVersion}"
phpPackages="${phpName}-{fpm,gd,mysql,curl,xml,zip,intl,mbstring,bz2,ldap,apcu,bcmath,gmp,imagick,igbinary,redis,smbclient,cli,common,opcache,readline} imagemagick"
aptOpt=
step_config() {
if [ $QUIET -ne 0 ] ; then
seq_config() {
if quiet ; then
aptOpt="-y"
fi
}
@@ -19,17 +19,17 @@ step_1_info() {
echo "Setup latest apt source list for $serverName"
echoinfo "$serverSourceUrl"
}
step_1_alias() { ALIAS="setup"; }
step_1_alias() { echo "setup"; }
step_1() {
shift
local osRelease=$1
endCheckEmpty osRelease "Debian release not provided"
echoseq " [I] Setup apt source for $serverName $serverSourceUrl"
info "Setup apt source for $serverName $serverSourceUrl"
local srvSource="deb $serverSourceUrl $osRelease nginx"
addConf -s "$srvSource" "$serverSourceLoc"
if [ $? -eq 0 ] ; then
echoseq " [I] Get repository key for $serverSourceUrl"Y
info "Get repository key for $serverSourceUrl"Y
exe apt install gnupg $aptOpt
exe apt-key adv --keyserver keyserver.ubuntu.com --recv-keys ABF5BD827BD9BF62
fi
@@ -40,7 +40,7 @@ step_2_info() {
echo "Installation of $serverName packages:"
echoinfo "$serverPackages"
}
step_2_alias() { ALIAS=install; }
step_2_alias() { echo install; }
step_2() {
exe apt update
exe apt install $serverPackages $aptOpt
@@ -64,8 +64,8 @@ step_3() {
# create webroot
exe mkdir -p "$siteLetsencryptWww"
echoseq -n "Restarting Nginx..."
exe service nginx restart && echoseq "ok"
info -n "Restarting Nginx..."
exe service nginx restart && info "ok"
endReturn -o $? "Failed to install $serverName"
}
snippetLetsencryptLoc="/etc/nginx/snippets/letsencrypt.conf"
@@ -86,7 +86,7 @@ step_4_info() {
echo "Installation of $phpName packages:"
echoinfo "$phpPackages"
}
step_4_alias() { ALIAS="php"; }
step_4_alias() { echo "php"; }
step_4() {
exe apt install $(eval echo $phpPackages) $aptOpt
}
@@ -157,12 +157,12 @@ step_5() {
exe sed -i 's/pm.max_spare_servers =.*/pm.max_spare_servers = '$PMaxSS'/' "$phpPoolConfigLocation"
exe sed -i "s/;pm.max_requests =.*/pm.max_requests = 1000/" "$phpPoolConfigLocation"
echoseq -n "Restarting ${phpName} ... "
exe service ${phpName}-fpm restart && echoseq "ok"
info -n "Restarting ${phpName} ... "
exe service ${phpName}-fpm restart && info "ok"
}
step_6_info() { echo "Installation notes"; }
step_6_alias() { ALIAS="notes"; }
step_6_alias() { echo "notes"; }
step_6() {
cat <<NOTES_EOF
# Set user to www-data on debian an tune performance a bit
@@ -179,5 +179,5 @@ events {
NOTES_EOF
}
VERSION_SEQREV=14
readonly sqr_minVersion=16
. /usr/local/bin/sequencer.sh