Skip to content

Instantly share code, notes, and snippets.

@PIE-yt
Created March 12, 2022 18:57
Show Gist options
  • Save PIE-yt/ff24170ae33006ba69cd07197639a5ea to your computer and use it in GitHub Desktop.
Save PIE-yt/ff24170ae33006ba69cd07197639a5ea to your computer and use it in GitHub Desktop.
MeTube systemd service
#Assumes Node.js 16 lts and python 3.8 installed via pyenv, but you should be able to modify the paths for your installation.
[Unit]
Description=MeTube
After=multi-user.target
After=network-online.target
Wants=network-online.target
[Service]
WorkingDirectory=/home/metube/metube
ExecStart=/home/metube/.local/share/virtualenvs/metube-DyD1lcVj/bin/python3 app/main.py
User=metube
Group=metube
Type=idle
Restart=always
RestartSec=15
RestartPreventExitStatus=0
TimeoutStopSec=10
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment