9 lines
158 B
Python
9 lines
158 B
Python
|
#!/usr/bin/env python
|
||
|
import os, time
|
||
|
|
||
|
fileage = os.path.getmtime('/var/log/ufw.log');
|
||
|
|
||
|
if time.time() - fileage > 7200:
|
||
|
print ('File is > 2 hours old')
|
||
|
|