Skip to content

Instantly share code, notes, and snippets.

@gmcclins
Last active May 18, 2016 01:03
Show Gist options
  • Save gmcclins/866cac03d1f0edf6db1b4170d83d4213 to your computer and use it in GitHub Desktop.
Save gmcclins/866cac03d1f0edf6db1b4170d83d4213 to your computer and use it in GitHub Desktop.
systemd unit to start plex on boot
# 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