aboutsummaryrefslogtreecommitdiffstats
path: root/ulri
diff options
context:
space:
mode:
Diffstat (limited to 'ulri')
-rwxr-xr-xulri16
1 files changed, 10 insertions, 6 deletions
diff --git a/ulri b/ulri
index 73cf729..bf40184 100755
--- a/ulri
+++ b/ulri
@@ -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 = (