fe80Grau / ytdlp2STRM

A little script to serve Youtube / Twitch / Crunchyroll videos without storage it. Uses yt-dlp HTTP data throught Flask and dynamic URLs. We can use this dynamic URLs to set STRM files.
https://github.com/fe80Grau/ytdlp2STRM
MIT License
173 stars 15 forks source link

systemd file doesnt work #17

Closed Amateur-God closed 7 months ago

Amateur-God commented 8 months ago

systemd file exits with the following error

     Loaded: loaded (/etc/systemd/system/ytdlp2strm.service; enabled; vendor preset: enabled)
     Active: activating (auto-restart) (Result: exit-code) since Mon 2023-11-06 07:04:02 GMT; 1s ago
    Process: 228880 ExecStart=/usr/bin/python3 /opt/ytdlp2STRM/main.py (code=exited, status=1/FAILURE)
   Main PID: 228880 (code=exited, status=1/FAILURE)
        CPU: 352ms

could be with how you starting it i recommend specifying a user and using the following exec start

ExecStart=/bin/bash -c cd /opt/ytdlp2STRM/ && python3 main.py

fe80Grau commented 8 months ago

can you paste here the full output. (you can check this with systemctl status ytdl2strm.service) Tell me your OS version. If you configure ytdlp2strm as root, you don't need to specify the user in the .service file

Amateur-God commented 7 months ago

can you paste here the full output. (you can check this with systemctl status ytdl2strm.service) Tell me your OS version. If you configure ytdlp2strm as root, you don't need to specify the user in the .service file

it could be that then as i specifically don't run anything as root, not even my own code,

fe80Grau commented 7 months ago

with chown youruser:yourgroup -R /opt/ytdl2strm may be works