9

A stackoverflow answer about running python scripts upon system startup uses {{ and }} in its syntax. What do they mean?

ExecStart={{ venv_home }}/bin/fooservice --serve-in-foreground

I am also not clear where venv_home comes from. I can't find it as any predefined variable and I can't imagine systemd has any knowledge about python virtual envs.

Here is the answer that I am struggling to understand: https://stackoverflow.com/a/37211676/2297550

2 Answers2

7

The curly braces mean nothing to systemd. The other question was either using them as a placeholder for a variable name or using some kind of template to generate systemd files.

5

In the linked example, {{ venv_home }} is a general placeholder for the location of the virtual environment in question (venv). For example, this could be /home/pi/yourproject. The double-curly-brace notation appears a bit flamboyant, which may have added to the confusion.

myhd
  • 157