summaryrefslogtreecommitdiff
path: root/man/systemd-run.xml
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2018-11-22 12:07:25 +0100
committerLennart Poettering <lennart@poettering.net>2018-11-23 12:49:00 +0100
commit2d21165a4e901a720a45d50344ecc9c3f078141f (patch)
tree584a0c47c587dc17050c090e63150ab431c3a138 /man/systemd-run.xml
parent91540eaa5c636f4073955f025c4e72b1bbb4f2e9 (diff)
downloadsystemd-2d21165a4e901a720a45d50344ecc9c3f078141f.tar.gz
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.
Diffstat (limited to 'man/systemd-run.xml')
-rw-r--r--man/systemd-run.xml17
1 files changed, 17 insertions, 0 deletions
diff --git a/man/systemd-run.xml b/man/systemd-run.xml
index 6c15d2d837..a34e20bc2b 100644
--- a/man/systemd-run.xml
+++ b/man/systemd-run.xml
@@ -208,6 +208,23 @@
</varlistentry>
<varlistentry>
+ <term><option>--working-directory=</option></term>
+
+ <listitem><para>Runs the service process with the specified working directory. Also see
+ <varname>WorkingDirectory=</varname> in
+ <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>--same-dir</option></term>
+ <term><option>-d</option></term>
+
+ <listitem><para>Similar to <option>--working-directory=</option> but uses the current working directory of the
+ caller for the service to execute.</para></listitem>
+ </varlistentry>
+
+ <varlistentry>
<term><option>-E <replaceable>NAME</replaceable>=<replaceable>VALUE</replaceable></option></term>
<term><option>--setenv=<replaceable>NAME</replaceable>=<replaceable>VALUE</replaceable></option></term>