postfixadmin - fix wrong template path during upgrade

This commit is contained in:
2022-09-10 00:24:45 +02:00
parent 35588dc713
commit 9229a11b5c

View File

@@ -4,8 +4,8 @@ toolName=postfixadmin
toolPhpDeps='php${PFA_PHP_VERSION:-}-fpm php${PFA_PHP_VERSION:-}-imap php${PFA_PHP_VERSION:-}-mbstring php${PFA_PHP_VERSION:-}-mysql php${PFA_PHP_VERSION:-}-json php${PFA_PHP_VERSION:-}-curl php${PFA_PHP_VERSION:-}-zip php${PFA_PHP_VERSION:-}-xml php${PFA_PHP_VERSION:-}-bz2 php${PFA_PHP_VERSION:-}-intl php${PFA_PHP_VERSION:-}-gmp' toolPhpDeps='php${PFA_PHP_VERSION:-}-fpm php${PFA_PHP_VERSION:-}-imap php${PFA_PHP_VERSION:-}-mbstring php${PFA_PHP_VERSION:-}-mysql php${PFA_PHP_VERSION:-}-json php${PFA_PHP_VERSION:-}-curl php${PFA_PHP_VERSION:-}-zip php${PFA_PHP_VERSION:-}-xml php${PFA_PHP_VERSION:-}-bz2 php${PFA_PHP_VERSION:-}-intl php${PFA_PHP_VERSION:-}-gmp'
toolConfName="config.local.php" toolConfName="config.local.php"
toolTemplates="templates_c" toolTemplates="templates_c"
toolTemplatesLoc="$PFA_SRV_LOC/$toolTemplates" toolTemplatesLoc=
toolAdditionsLoc="$PFA_SRV_LOC/ADDITIONS" toolAdditionsLoc=
latestUrl="https://api.github.com/repos/$toolName/$toolName/releases/latest" latestUrl="https://api.github.com/repos/$toolName/$toolName/releases/latest"
fetchmailUser="fetchmail" fetchmailUser="fetchmail"
fetchmailDeps="fetchmail liblockfile-simple-perl" fetchmailDeps="fetchmail liblockfile-simple-perl"
@@ -23,6 +23,8 @@ seq_config() {
info -a "${toolName} backup: ${PFA_BACKUP:-}" info -a "${toolName} backup: ${PFA_BACKUP:-}"
info -a " php Version: ${PFA_PHP_VERSION:-}" info -a " php Version: ${PFA_PHP_VERSION:-}"
CONFIG=1 CONFIG=1
toolTemplatesLoc="$PFA_SRV_LOC/$toolTemplates"
toolAdditionsLoc="$PFA_SRV_LOC/ADDITIONS"
else else
dry || return 1 dry || return 1
fi fi
@@ -206,7 +208,7 @@ step_22_info() {
shift shift
if contextExe; then if contextExe; then
echoinfo -n "Upgrade to version " echoinfo -n "Upgrade to version "
if [ -z "$1" ]; then if [ -z "${1:-}" ]; then
echo -n "$(curl --silent "$latestUrl" | grep -Po '"tag_name": "postfixadmin-\K.*?(?=")')" echo -n "$(curl --silent "$latestUrl" | grep -Po '"tag_name": "postfixadmin-\K.*?(?=")')"
else else
echo -n "$1" echo -n "$1"