Skip to content

Instantly share code, notes, and snippets.

@jcderr
Last active August 29, 2015 14:12
Show Gist options
  • Save jcderr/49b7ee3fc0ae689e7e2d to your computer and use it in GitHub Desktop.
Save jcderr/49b7ee3fc0ae689e7e2d to your computer and use it in GitHub Desktop.
ZNC Systemd Unit
[Unit]
Description=ZNC
Requires=docker.service
After=docker.service
[Service]
User=core
ExecStartPre=-/usr/bin/docker stop znc
ExecStartPre=-/usr/bin/docker rm znc
ExecStart=/usr/bin/docker run --name znc -p 36667:6667 -v ${HOME}/.znc:/znc-data jimeh/znc
ExecStop=/usr/bin/docker stop znc
[Install]
WantedBy=multi-user.target
@jcderr
Copy link
Author

jcderr commented Jan 6, 2015

Place this in /etc/systemd/system/ and run systemctl enable znc.service && systemd start znc.service

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