summaryrefslogtreecommitdiffstats
path: root/ftp_wizard/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'ftp_wizard/scripts')
-rw-r--r--ftp_wizard/scripts/ProFtpconf.pm4
1 files changed, 4 insertions, 0 deletions
diff --git a/ftp_wizard/scripts/ProFtpconf.pm b/ftp_wizard/scripts/ProFtpconf.pm
index 5db3c385..711ecc3c 100644
--- a/ftp_wizard/scripts/ProFtpconf.pm
+++ b/ftp_wizard/scripts/ProFtpconf.pm
@@ -42,6 +42,10 @@ sub check_dir {
}
sub get_dir {
+ my $file = "/etc/proftpd.conf";
+ die "no ftp configuration file found ! warning." if (!-f $file);
+ open(NEW, "< $file") or die "error while opening $file: $!";
+
while (<NEW>) { # we need 3 elements to consider section as known
if (m/^\s*<drakwizard>/s...m/^\s*<\/drakwizard>/s ) {
if (m/^\s*<Anonymous\s*(.*)>/s ) {