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:
parent
a496a9c1cc
commit
4079554096
1 changed files with 4 additions and 0 deletions
|
@ -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};
|
||||
|
|
Loading…
Add table
Reference in a new issue