diff options
Diffstat (limited to 'main/backuppc/fix-pidfile-path.patch')
-rw-r--r-- | main/backuppc/fix-pidfile-path.patch | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/main/backuppc/fix-pidfile-path.patch b/main/backuppc/fix-pidfile-path.patch new file mode 100644 index 0000000000..ad76a53961 --- /dev/null +++ b/main/backuppc/fix-pidfile-path.patch @@ -0,0 +1,35 @@ +--- a/bin/BackupPC ++++ b/bin/BackupPC +@@ -363,11 +363,11 @@ + # Write out our initial status and save our PID + # + StatusWrite(); +- unlink("$LogDir/BackupPC.pid"); +- if ( open(PID, ">", "$LogDir/BackupPC.pid") ) { ++ unlink("/run/backuppc/BackupPC.pid"); ++ if ( open(PID, ">", "/run/backuppc/BackupPC.pid") ) { + print(PID $$); + close(PID); +- chmod(0444, "$LogDir/BackupPC.pid"); ++ chmod(0444, "/run/backuppc/BackupPC.pid"); + } + + # +@@ -1846,7 +1846,7 @@ + close(LOG); + LogFileOpen(); + print(LOG "Fatal error: unhandled signal $SigName\n"); +- unlink("$LogDir/BackupPC.pid"); ++ unlink("/run/backuppc/BackupPC.pid"); + confess("Got new signal $SigName... quitting\n"); + } else { + $SigName = shift; +@@ -1968,7 +1968,7 @@ + } + delete($Info{pid}); + StatusWrite(); +- unlink("$LogDir/BackupPC.pid"); ++ unlink("/run/backuppc/BackupPC.pid"); + exit(1); + } + |