2

In the EnvironmentFile I have:

EBUSD_OPTS="--scanconfig -d /dev/ttyEBUS -c /etc/ebusd --log=\"all notice\" --log=\"update error\""

In the .service file:

EnvironmentFile=-/etc/default/ebusd
ExecStart=/usr/bin/ebusd $EBUSD_OPTS

I would expect the quotes after --log= to be passed unchanged to the executable, but that doesn't seem to work. I've tried all types of double, single quotes, double, triple escaping the inner quotes, single outer quotes, etc. with no success.

jjakob
  • 41
  • 5

1 Answers1

1

Take the outside quotes out of the EnvironmentFile

EBUSD_OPTS=--scanconfig -d /dev/ttyEBUS -c /etc/ebusd --log="all notice" --log="update error"

and add braces in ExecStart.

ExecStart=/usr/bin/ebusd ${EBUSD_OPTS} 

I've also had to have a trailing space after the brace.

Aaron Copley
  • 12,345
  • 5
  • 46
  • 67