run: add a switch for specifiying the working directory of a service
authorLennart Poettering <lennart@poettering.net>
Thu, 22 Nov 2018 11:07:25 +0000 (12:07 +0100)
committerLennart Poettering <lennart@poettering.net>
Fri, 23 Nov 2018 11:49:00 +0000 (12:49 +0100)
commit2d21165a4e901a720a45d50344ecc9c3f078141f
tree584a0c47c587dc17050c090e63150ab431c3a138
parent91540eaa5c636f4073955f025c4e72b1bbb4f2e9
run: add a switch for specifiying the working directory of a service

I find myself testing service management quite often with "systemd-run
-t /bin/bash". For that it is handy if the invoked shell would use the
working directory I am currently in. Hence introduce a shorthand for
that:

        $ systemd-run -dt /bin/bash

This will automatically insert a WorkingDirectory= property into the
transient service, pointing to the working directory of the caller.
man/systemd-run.xml
src/run/run.c