Bug#1018872: closed by Michael Biebl <biebl at debian.org> (Re: Bug#1018872: systemd.service COMMAND LINE misses command search, if starting with "+".)

Michael Biebl biebl at debian.org
Thu Sep 1 10:41:15 BST 2022


Am 01.09.22 um 11:10 schrieb Harald Bergmann:
> Hello Michael,
> 
> please test the told COMMAND LINE with multiple commands, before closing.
> Many thanks!


ExecStart* is not a shell. You can't run multiple commands there.
You can use multiple ExecStartPre lines though.


ExecStartPre=+/bin/mkdir -p <folder> ; +chown -R <user>:<group> <folder

is invalid syntax

Use
ExecStarPre=+mkdir
ExecStartPre=+chown



If you want shell syntax, you need to use a shell:
ExecStartPre=sh -c "command1; command2;..."
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-systemd-maintainers/attachments/20220901/a4b454f9/attachment.sig>


More information about the Pkg-systemd-maintainers mailing list