Last active
November 13, 2018 07:19
-
-
Save johnboiles/da4f3fac73105c82d900e8118dae1ec4 to your computer and use it in GitHub Desktop.
WebMCP Systemd Unit File
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=WebMCP | |
Requires=docker.service | |
After=docker.service | |
[Service] | |
# Uncomment to have systemd automatically restart this process if it fails | |
#Restart=always | |
# In case we didn't shut down properly, try to remove any container with the same name | |
ExecStartPre=-/usr/bin/docker rm -f webmcp | |
# Don't timeout (pull can take a while) | |
TimeoutStartSec=0 | |
ExecStartPre=-/usr/bin/docker pull madgrizzle/webmcp | |
ExecStart=/usr/bin/docker run --name webmcp --network="host" -v /home/pi/.WebControl:/root/.WebControl -v /var/run/docker.sock:/var/run/docker.sock -e HOST_HOME=/home/pi --privileged madgrizzle/webmcp | |
ExecStop=/usr/bin/docker stop -t 30 webmcp | |
[Install] | |
WantedBy=default.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment