В Tue, 19 Aug 2014 19:34:46 +0200 Florian Lindner <mailingli...@xgm.de> пишет:
> > It seems that using %i or %I to set the working directory does not work. bor@opensuse:~> sudo systemctl start foo@/home/bor.service bor@opensuse:~> cat /tmp/foo /home/bor %i=-home-bor %I=/home/bor bor@opensuse:~> cat /run/systemd/system/foo@.service [Unit] Description=Path %i (%I) [Service] Type=oneshot WorkingDirectory=%I ExecStart=/bin/sh -c '/bin/pwd > /tmp/foo; echo %%i=%i >> /tmp/foo; echo %%I=%I >> /tmp/foo' > When I do systemctl --user start git-commit@/home/florian/timer.test.service > the journal prints: > > Aug 19 18:43:01 asaru systemd[375]: Starting Auto commit for instance.... > Aug 19 18:43:01 asaru git[4761]: fatal: Not a git repository (or any of the > parent directories): .git > Aug 19 18:43:01 asaru systemd[375]: git-commit@-home-florian- > timer.test.service: main process exited, code=exited, status=128/n/a > Aug 19 18:43:01 asaru systemd[375]: Failed to start Auto commit for > instance.. > Aug 19 18:43:01 asaru systemd[375]: Unit git-commit@-home-florian- > timer.test.service entered failed state. > > > and wd (created in ~) contains > -home-florian-timer.test > -home-florian-timer.test > /home/florian > > Any ideas how I can change the working directory to the directory given by > the instance name? > Thx! > > > _______________________________________________ > systemd-devel mailing list > systemd-devel@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/systemd-devel _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel