From a035e2f6c5203dcc5eace4ee401391d71aa743ad Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Mon, 16 Jan 2023 10:53:54 -0800 Subject: [PATCH] Allow postinstall scripts to know when webmin is being upgraded --- setup.pl | 1 + setup.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.pl b/setup.pl index 22669e793..bf369d820 100755 --- a/setup.pl +++ b/setup.pl @@ -908,6 +908,7 @@ else { if (!$ENV{'nopostinstall'}) { print "Running postinstall scripts ..\n"; chdir($wadir); + $ENV{'WEBMIN_UPGRADING'} = $upgrading; system("$perl "."e_path("$wadir/run-postinstalls.pl")); print ".. done\n"; print "\n"; diff --git a/setup.sh b/setup.sh index 8664d5a72..843751208 100755 --- a/setup.sh +++ b/setup.sh @@ -983,7 +983,7 @@ fi if [ "$nopostinstall" = "" ]; then echo "Running postinstall scripts .." - (cd "$wadir" ; WEBMIN_CONFIG=$config_dir WEBMIN_VAR=$var_dir "$wadir/run-postinstalls.pl") + (cd "$wadir" ; WEBMIN_CONFIG=$config_dir WEBMIN_VAR=$var_dir WEBMIN_UPGRADING="$upgrading" "$wadir/run-postinstalls.pl") echo ".. done" echo "" fi