Skip to content

Instantly share code, notes, and snippets.

@jiphex
Last active September 7, 2015 15:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jiphex/65c6961852a0d349e80e to your computer and use it in GitHub Desktop.
Save jiphex/65c6961852a0d349e80e to your computer and use it in GitHub Desktop.
Systemd unit for lxc (e.g systemctl start lxc@containername)
[Unit]
Description=LXC %i
Requires=lxc.service
[Service]
ExecStart=/usr/bin/lxc-start --name=%i
ExecStop=/usr/bin/lxc-stop --name=%i
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment