put in the first run at new nagios configs

This commit is contained in:
Stephen Smoogen 2017-01-05 00:55:16 +00:00
parent a1957d29d4
commit 8cf72ff116
310 changed files with 13255 additions and 26 deletions

View file

@ -0,0 +1,17 @@
#!/usr/bin/python
import fcntl
import sys
try:
f = open('/mnt/koji/.nagios_test', 'r')
f.close()
f = open('/mnt/koji/.nagios_test', 'w')
except IOError:
print "Could not create file"
sys.exit(2)
fcntl.flock(f, fcntl.LOCK_EX)
f.close()
print "File Locked Successfully"
sys.exit(0)