diff options
Diffstat (limited to 'ulri')
-rwxr-xr-x | ulri | 16 |
1 files changed, 10 insertions, 6 deletions
@@ -55,12 +55,16 @@ plog_init($program_name, $LOG, 7, 1); my $HOME = $ENV{HOME}; my $configfile = "$HOME/.upload.conf"; - -my $config; -if (-f $configfile) { - $config = eval(cat_($configfile)) or die "FATAL $program_name: syntax error in $configfile"; -} else { - $config = {}; +my $sysconfigfile = "/etc/iurt/upload.conf"; + +my $config = {}; +foreach my $f ($configfile, $sysconfigfile) { + plog('DEBUG', "load config: $f"); + if (-f $f) { + $config = eval(cat_($f)) + or die "FATAL $program_name: syntax error in $f"; + last; + } } my %config_usage = ( |