-
Notifications
You must be signed in to change notification settings - Fork 11
Run as Service Linux
Michael Higgins edited this page Feb 19, 2023
·
2 revisions
Steps to setup PlexAutoSkip using services.d in Linux:
Assumes the script is installed in /usr/local/pas
, replace with your directory
- Go to
/etc/systemd/system/
- Create a new service:
sudo vim PlexAutoSkip.service
- Paste this template and modify accordingly:
# Plex Auto Skip Service
[Unit]
Description=Plex Autoskip
[Service]
#User=YOUR_USER
#Group=YOUR_USER_GROUP
Type=simple
Environment=LC_ALL=C.UTF-8
Environment=LANG=C.UTF-8
WorkingDirectory=/usr/local/pas
ExecStart=/usr/bin/python3 /usr/local/pas/main.py
Restart=always
RestartSec=10
[Install]
WantedBy=default.target
- Load the new service:
sudo systemctl --system daemon-reload
- Enable for boot up:
sudo systemctl enable PlexAutoSkip.service
- Start the service:
sudo systemctl start PlexAutoSkip.service
- To debug / look under the hood:
sudo journalctl -f -u PlexAutoSkip.service
Thanks to DevMan01 for the writeup