Skip to content

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

  1. Go to /etc/systemd/system/
  2. Create a new service: sudo vim PlexAutoSkip.service
  3. 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
  1. Load the new service: sudo systemctl --system daemon-reload
  2. Enable for boot up: sudo systemctl enable PlexAutoSkip.service
  3. Start the service: sudo systemctl start PlexAutoSkip.service
  4. To debug / look under the hood: sudo journalctl -f -u PlexAutoSkip.service

Thanks to DevMan01 for the writeup

Clone this wiki locally