Created
February 12, 2017 18:07
-
-
Save halkeye/e7974a9e485b6fc823809016f02cda91 to your computer and use it in GitHub Desktop.
My systemd file for running terraria
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
[Unit] | |
Description=terraria | |
After=docker.service | |
Requires=docker.service | |
[Service] | |
TimeoutStartSec=0 | |
Restart=always | |
# needed because tshock crashes when no stdin | |
StandardInput=tty | |
# Hijack tty11 for this purpose | |
TTYPath=/dev/tty11 | |
# all output should stay in the journal though | |
StandardOutput=journal | |
ExecStartPre=-/usr/bin/docker stop terraria | |
ExecStartPre=-/usr/bin/docker rm terraria | |
ExecStop=/usr/bin/docker stop terraria | |
ExecStart=/usr/bin/docker run --rm -it \ | |
-p 7777:7777 \ | |
-v /storage/games/terraria/world:/world \ | |
--name terraria \ | |
ryshe/terraria:latest \ | |
-autocreate 3 \ | |
-world /world/Lg-Normal-17-02.wld | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment