Skip to content

Instantly share code, notes, and snippets.

@kgorskowski
Forked from nickjacob/systemd-prblm.service
Last active August 29, 2015 14:15
Show Gist options
  • Save kgorskowski/c6ce84494b49ad75f599 to your computer and use it in GitHub Desktop.
Save kgorskowski/c6ce84494b49ad75f599 to your computer and use it in GitHub Desktop.
[Unit]
Description=Demonstrate Bash
[Service]
ExecStartPre=/usr/bin/bash -c "/usr/bin/systemctl set-environment MYVAR=$(( 2 + 2 ))"
ExecStart=/usr/bin/ech "2 + 2 = ${MYVAR}"
@kgorskowski
Copy link
Author

Reminder to self. How to set systemd environment variables

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment