Skip to content

Commit

Permalink
Fix use of wrong variable type
Browse files Browse the repository at this point in the history
  • Loading branch information
jcameron committed Feb 12, 2017
1 parent 163241e commit ecb51f9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions virtual_feature.pl
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit ecb51f9

Please sign in to comment.