From ecb51f9abf8cfe7018b46742697b3dadf73db9ac Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Sat, 11 Feb 2017 21:33:29 -0800 Subject: [PATCH] Fix use of wrong variable type --- virtual_feature.pl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/virtual_feature.pl b/virtual_feature.pl index bb09095..c9e4e76 100755 --- a/virtual_feature.pl +++ b/virtual_feature.pl @@ -304,10 +304,10 @@ sub feature_modify # Update hostname in file &lock_file($newfile); my $conf = &get_config($d->{'dom'}); - foreach my $d ("SiteDomain", "HostAliases") { - my $v = &find_value($d, $conf); + foreach my $dir ("SiteDomain", "HostAliases") { + my $v = &find_value($dir, $conf); $v =~ s/$oldd->{'dom'}/$d->{'dom'}/g; - &save_directive($conf, $d->{'dom'}, $d, $v); + &save_directive($conf, $d->{'dom'}, $dir, $v); } &flush_file_lines(); &unlock_file($newfile); @@ -335,10 +335,10 @@ sub feature_modify # Fix up domain in cron job &virtual_server::obtain_lock_cron($d); - &foreign_require("cron", "cron-lib.pl"); + &foreign_require("cron"); my $job = &find_cron_job($oldd->{'dom'}); if ($job) { - $job->{'command'} = "$cron_cmd $d->{'dom'}"; + $job->{'command'} =~ s/\Q$oldd->{'dom'}\E$/$d->{'dom'}/; &cron::change_cron_job($job); } &virtual_server::release_lock_cron($d);