Created
September 14, 2016 12:59
-
-
Save mapcentia/4ee048af05f2b1d157bdc489158131e9 to your computer and use it in GitHub Desktop.
gc2.service
This file contains hidden or 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
# systemd script for starting and stopping GC2 Docker containers. | |
# The start.sh script stays in the foreground and will exit if a container stops. | |
# If start.sh exits systemd will run the start.sh again and keep containers running. | |
# How to install | |
# Edit and put this content in /etc/systemd/system/gc2.service | |
# systemctl enable gc2 | |
# GC2 containers can be started/stopped by these cmds | |
# service gc2 start | |
# service gc2 stop | |
[Unit] | |
Description=MapCentia GC2 | |
After=docker.service | |
Requires=docker.service | |
[Service] | |
Restart=always | |
ExecStart=/bin/bash /root/scripts/gc2/start.sh | |
ExecStop=/bin/bash /root/scripts/gc2/stop.sh | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment