Hi!
I don't know, for which words I have to search to find a solution for my
Problem.
On my server i created a mailserver.target, on which all relevant
services for the mailserver depend. So i can [re]start and stop all
services (exim4, cyrus, saslauthd, amavis...) only with
systemctl start|restart|stop mailserver.target
The thing is, i have users not each with ~/.fetchmailrc
So i've written a unit
/etc/systemd/system/fetchmail@.service
[Unit]
Description=fetchmail for User %i
BindsTo=mailserver.target
After=cyrus-imapd.service exim4.service
ConditionFileNotEmpty=/home/%i/.fetchmailrc
[Service]
Type=simple
User=%i
Environment=FETCHMAILUSER=%i
ExecStart=/usr/bin/fetchmail --nodetach
#PIDFile=/home/%i/.fetchmail.pid
[Install]
WantedBy=mailserver.target
But i don't know, how to start this unit for each user.
systemctl start mailserver should scan each user and start
fetchmail@user1.service, fetchmail@user2.service...
Is this possible with systemd? Or should i create a shell-script to do
the job?
greetings
Jakob
--
http://xundeenergie.at
http://verkehrsloesungen.wordpress.com/
http://cogitationum.wordpress.com/
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel