--- 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);
 }
 
