From 06bfb8f3de01fe76b86d25d1d8e757e0285f9025 Mon Sep 17 00:00:00 2001 From: brent s Date: Thu, 17 Jan 2019 06:00:32 -0500 Subject: [PATCH] gorRAM IT --- aif/scripts/post/sshsecure.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/aif/scripts/post/sshsecure.py b/aif/scripts/post/sshsecure.py index 4aa947d..335d579 100644 --- a/aif/scripts/post/sshsecure.py +++ b/aif/scripts/post/sshsecure.py @@ -348,9 +348,12 @@ def main(): # We're still running. Exit gracefully. print('We seem to still be running from a past execution; exiting') exit(0) + else: + # It's a stale PID file. + os.remove(self_pidfile) else: with open(self_pidfile, 'w') as f: - f.write(str(os.getpid())) + 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.