Skip to main content
bringing to the answer an important information burried in the comments
Source Link
Stephen Rauch
  • 4.3k
  • 15
  • 24
  • 33

On systemd >= 227 you should be able to use the WorkingDirectory=/usr/local:

[Service]
WorkingDirectory=/usr/local

to get your script to execute there. File in under the [Service] section.

(DOCS)

On systemd >= 227 you should be able to use the WorkingDirectory=/usr/local to get your script to execute there. File in under the [Service] section.

On systemd >= 227 you should be able to use:

[Service]
WorkingDirectory=/usr/local

to get your script to execute there.

(DOCS)

bringing to the answer an important information burried in the comments
Source Link

On systemd >= 227 you should be able to use the WorkingDirectory=/usr/local to get your script to execute there. File in under the [Service] section.

On systemd >= 227 you should be able to use the WorkingDirectory=/usr/local to get your script to execute there.

On systemd >= 227 you should be able to use the WorkingDirectory=/usr/local to get your script to execute there. File in under the [Service] section.

The WorkingDirectory property for transient units was not added to systemd until 227 (https://github.com/systemd/systemd/blob/master/NEWS#L1743)
Source Link

YouOn systemd >= 227 you should be able to use the WorkingDirectory=/usr/local to get your script to execute there.

You should be able to use the WorkingDirectory=/usr/local to get your script to execute there.

On systemd >= 227 you should be able to use the WorkingDirectory=/usr/local to get your script to execute there.

Source Link
Eric Renouf
  • 18.7k
  • 7
  • 51
  • 66
Loading