diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2016-12-04 14:50:56 +0100 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2016-12-04 15:07:52 +0100 |
commit | 5eebb2d08f9f13511c6d0a1b6f3efdf18077b58a (patch) | |
tree | b370428bbb8ebea9bee50c6026508dec025cca90 /main/backuppc/fix-pidfile-path.patch | |
parent | 381dcede14c1ad64e6734a8a6141cc56c9ade7d4 (diff) | |
download | aports-5eebb2d08f9f13511c6d0a1b6f3efdf18077b58a.tar.bz2 aports-5eebb2d08f9f13511c6d0a1b6f3efdf18077b58a.tar.xz |
main/backuppc: rewrite runscript and fix pidfile location
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); + } + |