...
 
Commits (2)
#!/usr/bin/env python3
import os
import sys
import pwd
import re
import string
......@@ -84,7 +85,7 @@ def process_mailtext():
nameset.add(fullname)
username = os.getlogin()
username = pwd.getpwuid(os.getuid()).pw_name
recentmail.load(
"/tmp/.{username}.recentemailaddresses".format(username=username))
process_mailtext()
......
......@@ -3,8 +3,8 @@ Description=Restore and save database of recently used email addresses
[Service]
Type=oneshot
ExecStart=/usr/bin/bash -c "/usr/bin/unxz <%h/.recentemailaddresses.xz >/tmp/.%u.recentemailaddresses ; chmod 600 /tmp/.%u.recentemailaddresses"
ExecStop=/usr/bin/bash -c "/usr/bin/xz </tmp/.%u.recentemailaddresses >%h/.recentemailaddresses.xz ; rm -f /tmp/.%u.recentemailaddresses"
ExecStart=/bin/bash -c "/usr/bin/unxz <%h/.recentemailaddresses.xz >/tmp/.%u.recentemailaddresses ; chmod 600 /tmp/.%u.recentemailaddresses"
ExecStop=/bin/bash -c "/usr/bin/xz </tmp/.%u.recentemailaddresses >%h/.recentemailaddresses.xz ; rm -f /tmp/.%u.recentemailaddresses"
RemainAfterExit=yes
[Install]
......