diff options
Diffstat (limited to 'contrib/systemd')
| -rw-r--r-- | contrib/systemd/README | 3 | ||||
| -rw-r--r-- | contrib/systemd/README.systemd | 23 | ||||
| -rw-r--r-- | contrib/systemd/fetchmail.service | 13 |
3 files changed, 39 insertions, 0 deletions
diff --git a/contrib/systemd/README b/contrib/systemd/README new file mode 100644 index 00000000..6ac889c1 --- /dev/null +++ b/contrib/systemd/README @@ -0,0 +1,3 @@ +README.systemd and fetchmail.service were contributed by +Barak A. Pearlmutter <barak@pearlmutter.net> on 2021-11-23 +through Debian's Bug Tracking System, https://bugs.debian.org/981464 diff --git a/contrib/systemd/README.systemd b/contrib/systemd/README.systemd new file mode 100644 index 00000000..fd7229a0 --- /dev/null +++ b/contrib/systemd/README.systemd @@ -0,0 +1,23 @@ +To run fetchmail as a systemd user service, for an individual user: + +(1) Configuration + +Set up your .fetchmailrc so that "fetchmail --nodetach" actually +fetches your mail correctly. + +(2) Tell systemd to run it as a service + +Allow daemons to keep running after you log out (optional): +$ sudo loginctl enable-linger $USERNAME + +Make the service available: +$ systemctl --user enable fetchmail.service + +Actually turn it on: +$ systemctl --user start fetchmail.service + +Monitor it, to check if it's okay: +$ systemctl --user status fetchmail.service + +Monitor it harder: +$ journalctl --user -xeu fetchmail.service diff --git a/contrib/systemd/fetchmail.service b/contrib/systemd/fetchmail.service new file mode 100644 index 00000000..4f0bf410 --- /dev/null +++ b/contrib/systemd/fetchmail.service @@ -0,0 +1,13 @@ +# /usr/lib/systemd/user/fetchmail.service +# or any other location per man:systemd.unit(5) +[Unit] +Description=Fetchmail Daemon +Documentation=man:fetchmail(1) + +[Service] +ExecStart=fetchmail --nodetach --daemon 300 +ExecStop=fetchmail --quit +Restart=always + +[Install] +WantedBy=default.target |
