From 248cb719c020c7171c6b6deed2e52d2a82771f3c Mon Sep 17 00:00:00 2001 From: Ilia Ross Date: Sat, 29 Jun 2024 23:32:15 +0300 Subject: [PATCH] Fix restart command depend on config dir --- bin/patch | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/patch b/bin/patch index ccf932df5..ebafa5409 100755 --- a/bin/patch +++ b/bin/patch @@ -30,7 +30,8 @@ if (!-r "$path/$lib") { } # Init core -$ENV{'WEBMIN_CONFIG'} = $opt{'config'} || "/etc/webmin"; +my $config_dir = $opt{'config'} || '/etc/webmin'; +$ENV{'WEBMIN_CONFIG'} = $config_dir; push(@INC, $path); eval 'use WebminCore'; init_config(); @@ -104,7 +105,7 @@ if ($output !~ /applied patch.*?cleanly/i) { } print "Patch applied successfully to:\n"; print " $1\n" while $output =~ /^Applied patch\s+(\S+)/mg; -system('/etc/webmin/restart'); +system("$config_dir/restart"); =pod