Don't die badly when config file just isn't there.

Instead, give a message in the conky output, which is the better thing to do,
since the config file (at least for me) may be on a partition that hasn't
been mounted.
This commit is contained in:
Bradley M. Kuhn 2014-01-24 07:02:22 -05:00
parent a496a9c1cc
commit 4079554096

View file

@ -545,6 +545,10 @@ sub ReadConfig($) {
system("/usr/bin/lockfile -r 8 $CALENDAR_LOCK_FILE");
DieLog("Failure to acquire calendar lock on $CALENDAR_LOCK_FILE") unless ($? == 0);
if (not -r $CONFIG_FILE) {
print "\${color5}$CONFIG_FILE does not exist\n";
exit 0;
}
my $config = ReadConfig($CONFIG_FILE);
$config->{scrubPrivate} = 0 if not defined $config->{scrubPrivate};