From 0febad432acfa1a0741faf43f54c18504a5522b0 Mon Sep 17 00:00:00 2001 From: brent s Date: Sun, 16 Aug 2020 12:59:48 -0400 Subject: [PATCH] fixing stale pid file bug --- aif/scripts/post/sshsecure.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/aif/scripts/post/sshsecure.py b/aif/scripts/post/sshsecure.py index fb7e1fb..d2232df 100644 --- a/aif/scripts/post/sshsecure.py +++ b/aif/scripts/post/sshsecure.py @@ -405,9 +405,8 @@ def main(): else: # It's a stale PID file. os.remove(self_pidfile) - else: - with open(self_pidfile, 'w') as f: - f.write(str(os.getpid()) + '\n') + with open(self_pidfile, 'w') as f: + f.write(str(os.getpid()) + '\n') _chkfile = '/etc/ssh/.aif-generated' if not os.path.isfile(_chkfile): # Warning: The moduli stuff can take a LONG time to run. Hours.