Comment by jjgreen

3 hours ago

key-value pairs where the = cannot be surrounded by spaces, so I have to write

  [Service]
  Type=oneshot
  WorkingDirectory={{ home }}/current/
  Environment=RAILS_ENV=production
  ExecStart=/bin/sh -lc "bin/db-backup --verbose"

which fills me with sadness

Whitespace immediately before or after the equals sign is completely ignored by the parser. Its the standard INI format.

What? You absolutely can have spaces; most of mine look more like

  [Service]
  Type             = oneshot
  WorkingDirectory = %h/current/
  Environment      = RAILS_ENV=production
  ExecStart        = /bin/sh -lc "bin/db-backup --verbose"

  • Friend, you have changed my life

    • Is this one of those cases where at one point you had an error in the file and you figured it was down to spaces? You fixed that issue, it still didn't work but from that point you never thought to question the assumption.

      I find myself doing this sort of thing all the time..

      1 reply →