From 9229a11b5c2748f1bf88087e096e30cfb0140b65 Mon Sep 17 00:00:00 2001 From: Martin Winkler Date: Sat, 10 Sep 2022 00:24:45 +0200 Subject: [PATCH] postfixadmin - fix wrong template path during upgrade --- seqs/postfixadmin.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/seqs/postfixadmin.sh b/seqs/postfixadmin.sh index 1b8c317..649290e 100755 --- a/seqs/postfixadmin.sh +++ b/seqs/postfixadmin.sh @@ -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' toolConfName="config.local.php" toolTemplates="templates_c" -toolTemplatesLoc="$PFA_SRV_LOC/$toolTemplates" -toolAdditionsLoc="$PFA_SRV_LOC/ADDITIONS" +toolTemplatesLoc= +toolAdditionsLoc= latestUrl="https://api.github.com/repos/$toolName/$toolName/releases/latest" fetchmailUser="fetchmail" fetchmailDeps="fetchmail liblockfile-simple-perl" @@ -23,6 +23,8 @@ seq_config() { info -a "${toolName} backup: ${PFA_BACKUP:-}" info -a " php Version: ${PFA_PHP_VERSION:-}" CONFIG=1 + toolTemplatesLoc="$PFA_SRV_LOC/$toolTemplates" + toolAdditionsLoc="$PFA_SRV_LOC/ADDITIONS" else dry || return 1 fi @@ -206,7 +208,7 @@ step_22_info() { shift if contextExe; then echoinfo -n "Upgrade to version " - if [ -z "$1" ]; then + if [ -z "${1:-}" ]; then echo -n "$(curl --silent "$latestUrl" | grep -Po '"tag_name": "postfixadmin-\K.*?(?=")')" else echo -n "$1"