On Tue, 19.08.14 19:34, Florian Lindner (mailingli...@xgm.de) wrote: > Hello, > I have a systemd unit that should do a commit on a specific path. Since > there are more then one path / repos, I want to use an instantiated unit for > that (the stuff with @ in the unit name): > > > ~/.config/systemd/user % cat git-commit@.service > [Unit] > Description=Auto commit for instance. > > [Service] > Type = oneshot > Nice = 10 > > # git returns 1 if there is nothing to commit > SuccessExitStatus=1 > > WorkingDirectory = %I # also tried %i > ExecStart = /usr/bin/sh -c 'echo %i > wd' > ExecStart = /usr/bin/sh -c 'echo %i >> wd' > ExecStart = /usr/bin/sh -c 'echo `pwd` >> wd' > ExecStart = /usr/bin/git add --all . > ExecStart = /usr/bin/git commit -a -m "Automatic commit."
Use "%f" for unescaping paths. Lennart -- Lennart Poettering, Red Hat _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel