diff options
Diffstat (limited to 'news_wizard')
-rw-r--r-- | news_wizard/scripts/Newsconf.pm | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/news_wizard/scripts/Newsconf.pm b/news_wizard/scripts/Newsconf.pm index ddd99f6f..10b6bfa6 100644 --- a/news_wizard/scripts/Newsconf.pm +++ b/news_wizard/scripts/Newsconf.pm @@ -61,11 +61,12 @@ sub do_it { $_; } cat_("__WIZ_HOME__/news_wizard/scripts/config.default")); $file = "/var/spool/cron/news"; - -f $file and MDK::Common::cp_af($file, "/etc/leafnode/crontab"); - $file = "/etc/leafnode/crontab"; - MDK::Common::cp_af($file, $file . ".orig"); - my $file = "/etc/leafnode/crontab"; - output($file, map { + my $file_c = "/etc/leafnode/crontab"; + if (-f $file) { + MDK::Common::cp_af($file, $file_c); + MDK::Common::cp_af($file, $file . ".orig"); + } + output($file_c, map { s|__freq__|$freq|g; $_; } cat_("__WIZ_HOME__/news_wizard/scripts/news.cron")); |