Allow postinstall scripts to know when webmin is being upgraded

This commit is contained in:
Jamie Cameron
2023-01-16 10:53:54 -08:00
parent 2406f19084
commit a035e2f6c5
2 changed files with 2 additions and 1 deletions

View File

@@ -908,6 +908,7 @@ else {
if (!$ENV{'nopostinstall'}) {
print "Running postinstall scripts ..\n";
chdir($wadir);
$ENV{'WEBMIN_UPGRADING'} = $upgrading;
system("$perl ".&quote_path("$wadir/run-postinstalls.pl"));
print ".. done\n";
print "\n";

View File

@@ -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