- A service starts in the
/directory, with a short PATH and none of your login's settings: relative paths and programs from~/binare not found inside it.WorkingDirectory=sets the service's directory. - A script's output and errors inside a service go to the service's journal, and its exit status decides whether the run succeeded.
flock -nat the top of a script lets one copy through — started by the timer or by hand — and the second exits at once with status 1.- backup.sh from the start of the lesson worked by hand and failed as a service because it looked for data and archive in the current directory, and for a service that is
/.
Step 6 of 6 · summary · 2 min
Summary
Found an inaccuracy? Report an error in the lesson