[#191] Fix error when stopping stopped web daemon

This commit is contained in:
Oliver Gorwits
2015-01-25 09:43:34 +00:00
parent f4f955885d
commit bd029bcdb1
2 changed files with 6 additions and 0 deletions

View File

@@ -64,6 +64,7 @@ my $log_file = file($log_dir, 'netdisco-web.log');
foreach my $file ($pid_file, $log_file) {
unless (-e $file) {
sysopen my $fh, $file, O_WRONLY|O_CREAT|O_NONBLOCK|O_NOCTTY;
print $fh '0' if $file eq $pid_file;
close $fh;
}
chown $uid, $gid, $file;