Last active
May 18, 2016 01:03
-
-
Save gmcclins/866cac03d1f0edf6db1b4170d83d4213 to your computer and use it in GitHub Desktop.
systemd unit to start plex on boot
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
# Place the following as plex.service file in ~/.config/systemd/user | |
# sudo systemctl enable ~/.config/systemd/user/plex.service | |
# sudo systemctl daemon-reload | |
# sudo systemctl restart service.service | |
[Unit] | |
Description=Plex service | |
Requires=docker.service | |
After=docker.service | |
[Service] | |
Restart=always | |
ExecStart=/usr/bin/docker start -a plex | |
ExecStop=/usr/bin/docker stop -t 2 plex | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment