On Di, 26.11.19 13:55, Amish (anon.amish@xxxxxxxxx) wrote: > If I change code to not call systemd-inhibit: > > $ cat /home/foo/downloads/dnld.sh > #!/bin/bash > /home/foo/downloads/dnld.pl > > Then service file runs fine. > > # systemctl start dnld.service; sleep 30 > # journalctl -u dnld.service > Nov 26 13:50:17 foo systemd[1]: Started Download files. > Nov 26 13:50:37 foo systemd[1]: dnld.service: Succeeded. > > So how do I allow systemd-inhibit call when a script is called via systemd > instead of directly? > > Is this systemd bug or am I missing something in dnld.service file? You need to allow this in PolicyKit. if you request an inhibitor from a login shell you get policykit privs because of the default policy. If you do this from a non-logged in user you won't, and need to adjust the policy. Lennart -- Lennart Poettering, Berlin _______________________________________________ systemd-devel mailing list systemd-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/systemd-devel