Use a pre-existing target for systemd services
Providing mail.target is really confusing and poor UX: * When a user enables a unit, it's not truly enabled until they ALSO enable mail.target. This is very counter-intuitive. * `mail.target` provides no extra value in itself, nor is it anything "standard". * Any user wanting this specific target can still continue using it just dropping in a `mail.target` file. Signed-off-by: Hugo Osvaldo Barrera <hugo@barrera.io> Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
This commit is contained in:
parent
87d92badfc
commit
e7a3fd55ac
@ -21,10 +21,6 @@ start offlineimap.service` or by enabling the timer unit using `systemctl --user
|
||||
enable offlineimap.timer`. Additionally, specific accounts may be triggered by
|
||||
using `offlineimap@myaccount.timer` or `offlineimap@myaccount.service`.
|
||||
|
||||
These unit files are installed as being enabled via a `mail.target` unit which
|
||||
is intended to be a catch-all for mail-related unit files. A simple
|
||||
`mail.target` file is also provided.
|
||||
|
||||
If the defaults provided by these units doesn't suit your setup, any of the
|
||||
values may be overridden by using `systemctl --user edit offlineimap.service`.
|
||||
This'll prevent having to copy-and-edit the original file.
|
||||
|
@ -1,5 +0,0 @@
|
||||
[Unit]
|
||||
Description=Mail Target
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
@ -9,4 +9,4 @@ ExecStart=/usr/bin/offlineimap -o -a %i -u basic
|
||||
TimeoutStopSec=120
|
||||
|
||||
[Install]
|
||||
WantedBy=mail.target
|
||||
WantedBy=default.target
|
||||
|
@ -8,4 +8,4 @@ Restart=on-failure
|
||||
RestartSec=60
|
||||
|
||||
[Install]
|
||||
WantedBy=mail.target
|
||||
WantedBy=default.target
|
||||
|
@ -7,4 +7,4 @@ OnUnitInactiveSec=15m
|
||||
Unit=offlineimap-oneshot.service
|
||||
|
||||
[Install]
|
||||
WantedBy=mail.target
|
||||
WantedBy=default.target
|
||||
|
@ -8,4 +8,4 @@ Restart=on-failure
|
||||
RestartSec=60
|
||||
|
||||
[Install]
|
||||
WantedBy=mail.target
|
||||
WantedBy=default.target
|
||||
|
@ -7,4 +7,4 @@ OnUnitInactiveSec=15m
|
||||
Unit=offlineimap-oneshot@%i.service
|
||||
|
||||
[Install]
|
||||
WantedBy=mail.target
|
||||
WantedBy=default.target
|
||||
|
Loading…
Reference in New Issue
Block a user