Add service to start offlineimap on linux automatically

This commit is contained in:
2025-10-15 02:35:01 +02:00
parent 47571bc1d8
commit 52ec953d0a
5 changed files with 38 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
[Unit]
Description=Run offlineimap in the background for {{ ansible_user_id }}
[Service]
User={{ ansible_user_id }}
SetCredentialEncrypted=enpass-password: {{ encrypted_enpass_password.value | replace("\n", " ") }}
ExecStart=bash -c 'source ~/.profile && MASTERPW="$(systemd-creds cat enpass-password)" ~/.local/bin/offlineimap'
[Install]
WantedBy=graphical.target