[systemd-devel] Using path name in instantiated units

Lennart Poettering lennart at poettering.net
Wed Aug 20 05:58:51 PDT 2014


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`

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list