Lennart Poettering wrote in message <20141008094838.GB26284@gardel-login>: > On Tue, 07.10.14 19:18, Simon Peeters (peeters.si...@gmail.com) wrote: >> ExecStart=/bin/sh -c ". /something/that/sets/var; /some/file $var" > THis would certainly work, but I'd strongly advise to use "exec" for > executing /some/file at the end, so that the shell process is replaced > by the actual daemon process, instead of continuing running with the > demon process as child.
I am hijacking the thread because one minor inconvenience I have with sh -c 'exec foo' is that in journalctl the logging refers to 'sh': For instance: [Unit] Description=Git backup ConditionPathIsDirectory=%h/backups/gitbackup [Service] Type=simple ExecStart=/bin/sh -c 'exec %h/mine/script/gitbackup -v save' Nice=19 IOSchedulingClass=best-effort IOSchedulingPriority=7 gives me the log: Oct 08 21:35:43 mithrim sh[9680]: [master 54c23ae] Oct 08 21:35:43 mithrim sh[9680]: 2 files changed, 3 insertions(+), 3 deletions(-) Do you know of any way to get 'gitbackup' in the log rather than 'sh'? _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel