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


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.


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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.