You are not logged in.

#1 2012-12-12 14:48:13

devil_kc
Member
From: Koprivnica, Croatia
Registered: 2008-09-14
Posts: 82

systemd service starts command twice

Hello,

i have a problem with systemd service for inotifywait check my mails.
service:

[Unit]
Description=Start mailnotify as a daemon
Requires=offlineimap.service
After=offlineimap.service

[Service]
User=matija
ExecStart=/home/matija/bin/mailnotify.sh

[Install]
WantedBy=multi-user.target

and when i start it:

sudo systemctl status mailnotify.service
mailnotify.service - Start mailnotify as a daemon
	  Loaded: loaded (/usr/lib/systemd/system/mailnotify.service; disabled)
	  Active: active (running) since Wed, 2012-12-12 15:46:00 CET; 6s ago
	Main PID: 13650 (mailnotify.sh)
	  CGroup: name=systemd:/system/mailnotify.service
		  ├─13650 /bin/bash /home/matija/bin/mailnotify.sh
		  ├─13652 /bin/bash /home/matija/bin/mailnotify.sh
		  └─13653 inotifywait -e create -e moved_to /home/matija/Maildir/Archives.2012/new /home/matija/Maildir/Archives/new /hom...

Dec 12 15:46:00 workarch systemd[1]: Starting Start mailnotify as a daemon...
Dec 12 15:46:00 workarch systemd[1]: Started Start mailnotify as a daemon.

but it doesn't work.
when i start /home/matija/bin/mailnotify.sh it works as expected.
Could you please help me with that?
Thanks

Offline

Board footer

Powered by FluxBB