How can I use spaces in systemd command line arguments?

前端 未结 7 1421
情话喂你
情话喂你 2021-01-17 11:52

I have a systemd unit with spaces in an argument

ExecStart=command --argument=\"text text\"

It seems that systemd does not recognize the do

7条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-17 12:05

    Environment is a way to do it.

    You can also use \s as space, so ExecStart will be:

    ExecStart=command --argument="text=\stext"
    

    ref: https://www.freedesktop.org/software/systemd/man/systemd.service.html#Command%20lines

提交回复
热议问题