[systemd-devel] Using path name in instantiated units

Florian Lindner mailinglists at xgm.de
Wed Aug 20 06:24:22 PDT 2014


Lennart Poettering wrote:

> On Wed, 20.08.14 10:25, Florian Lindner (mailinglists at xgm.de) wrote:
> 
>> The timer I try to enable contains a Install section.
>> 
>> florian at asaru ~/.config/systemd/user % cat git-commit at .timer
>> [Unit]
>> Description=Timer to commit all changes in instance.
>> 
>> [Timer]
>> OnUnitActiveSec=5min
>> OnActiveSec=5min
>> AccuracySec = 5min
>> 
>> [Install]
>> WantedBy=default.target
> 
>> florian at asaru ~/.config/systemd/user % systemctl --user enable git-
>> commit@/home/florian/timer.test.timer
>> Failed to execute operation: Invalid argument
> 
> Use something like this instead:
> 
>     systemctl --user enable `systemd-escape -p
>     --template=git-commit at .timer /home/florian/timer.test`

systemd-escape has not landed in my distribution yet (Arch). But with manual 
escaping to git-commit at home-florian-timer.test.timer and using %f it works.

Thanks!



More information about the systemd-devel mailing list