diff --git a/gpg/sksdump.py b/gpg/sksdump.py index 45a8736..07dfef4 100755 --- a/gpg/sksdump.py +++ b/gpg/sksdump.py @@ -148,6 +148,8 @@ def syncDB(): '--delete', os.path.join(sks['destdir'], '.'), sks['rsync']] + with open(sks['logfile'], 'a') as f: + f.write('===== {0} Rsyncing to mirror =====\n'.format(str(datetime.datetime.utcnow()))) with open(sks['logfile'], 'a') as f: subprocess.run(cmd, stdout = f, stderr = f) return() @@ -155,9 +157,14 @@ def syncDB(): def main(): if getpass.getuser() not in ('root', sks['user']): exit('ERROR: You must be root or {0}!'.format(sks['user'])) + with open(sks['logfile'], 'a') as f: + f.write('===== {0} STARTING ====='.format(str(datetime.datetime.utcnow()))) dumpDB() compressDB() syncDB() + with open(sks['logfile'], 'a') as f: + f.write('===== {0} DONE ====='.format(str(datetime.datetime.utcnow()))) + if __name__ == '__main__': main()