Thank you Kimmo,
maybe user daemons are not supported? I'll try to run it as a system daemon
and see if it works.
By the way, can someone explain what does /usr/bin/invoker do? When is it
needed / useful?
On Fri, Jan 24, 2014 at 12:35 PM, Kimmo Lindholm wrote:
> I have put my .service file under systemd/system –folder and used
> systemctl enable (not -user) and it starts successfully at boot.
>
> I start it without invoker (ExecStart directly calls the executable)
>
>
>
> (But I need root access for the daemon)
>
>
>
>
>
>
>
> *From:* devel-boun...@lists.sailfishos.org [mailto:
> devel-boun...@lists.sailfishos.org] *On Behalf Of *Luca Donaggio
> *Sent:* 24. tammikuuta 2014 11:42
> *To:* Sailfish OS Developers
> *Subject:* [SailfishDevel] How to automatically start a daemon with
> systemd
>
>
>
> Hi all,
>
> I'v written a small personal (not looking for harbour approval here) C++
> app which periodically connects to a web service and displays some
> information into a notification via DBus.
>
> This is the .service file which I've deployed in /etc/systemd/user:
>
>
> [Unit]
> Description=My own daemon
> Requires=dbus.service
>
> [Service]
> Type=simple
> ExecStart=/usr/bin/invoker --type=generic /usr/bin/myowndaemon
>
> [Install]
> WantedBy=multi-user.target
>
> after the usual:
>
> systemctl-user daemon-reload
>
> systemctl-user start myowndaemon.service
>
> it correctly starts.
>
> Now if I issue a:
>
> systemctl-user enable myowndaemon.service
>
> and I reboot my Jolla, it doesn't automatically start.
>
> This is my first attempt with systemd, I tried googling around but I
> didn't find anything helpful.
>
> Wht am I missing?
>
> Thanks a lot,
>
>
> --
> Luca Donaggio
>
> ___
> SailfishOS.org Devel mailing list
>
--
Luca Donaggio
___
SailfishOS.org Devel mailing list