summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrent s <r00t@square-r00t.net>2020-08-16 12:59:48 -0400
committerbrent s <r00t@square-r00t.net>2020-08-16 12:59:48 -0400
commit0febad432acfa1a0741faf43f54c18504a5522b0 (patch)
treec329d7748f8db7a0558872192cbf5b5de4dc19ad
parent473833a58f996c09d23d0b3dfac93ded887e7162 (diff)
downloadOpTools-0febad432acfa1a0741faf43f54c18504a5522b0.tar.xz
fixing stale pid file bug
-rw-r--r--aif/scripts/post/sshsecure.py5
1 files 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.