Skip to content

Instantly share code, notes, and snippets.

@gargolito
Created March 27, 2019 14:36
Show Gist options
  • Save gargolito/6553f18b5ef048e02122c7cbf7b23adf to your computer and use it in GitHub Desktop.
Save gargolito/6553f18b5ef048e02122c7cbf7b23adf to your computer and use it in GitHub Desktop.
#systemd #linux
[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}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment