Closed Deltapie7 closed 1 year ago
I’m glad you got it going. It’s important to get the service started in the same folder as the code because the software assumes the config.ini and keys.dat are in the same folder.
Type=idle
User=slingbox
WorkingDirectory=/home/slingbox
StandardOutput=append:/tmp/sling.log
StandardError=append:/tmp/sling.log
ExecStart=/usr/bin/python -u slingbox_server.py
Restart=always
So this “should” have worked. Without having to put the full path in the exec start. Maybe it’s a permissions issue.
From: Deltapie7 @.> Sent: Monday, July 18, 2022 12:21 PM To: GerryDazoo/Slinger @.> Cc: Subscribed @.***> Subject: [GerryDazoo/Slinger] slinger.service file (Issue #7)
Couldn't get the python script to auto run on startup... edited the slinger.service file to look like below.
Using a raspberrypi PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)" NAME="Raspbian GNU/Linux" VERSION_ID="9" VERSION="9 (stretch)" VERSION_CODENAME=stretch ID=raspbian ID_LIKE=debian
Change made = ExecStart=/usr/bin/python3 -u /home/slingbox/slingbox_server.py
From = ExecStart=/usr/bin/python -u slingbox_server.py
All started to work for me after that. Not sure if it's a good fix or not, but wanted to tell you about what I did to get it to start working.
Thanks!
[Unit] Description=SlingBox Server Service After=multi-user.target
[Service] Type=idle User=slingbox WorkingDirectory=/home/slingbox StandardOutput=append:/tmp/sling.log StandardError=append:/tmp/sling.log ExecStart=/usr/bin/python3 -u /home/slingbox/slingbox_server.py Restart=always
[Install] WantedBy=multi-user.target
— Reply to this email directly, view it on GitHub https://github.com/GerryDazoo/Slinger/issues/7 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AYOYVQJR6CF5N3GTVG42Z3LVUVY6NANCNFSM534UPZTA . You are receiving this because you are subscribed to this thread. https://github.com/notifications/beacon/AYOYVQLZLGAXN53IN2Z7LFTVUVY6NA5CNFSM534UPZTKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4TPYLE2A.gif Message ID: @. @.> >
Thanks again!
Couldn't get the python script to auto run on startup... edited the slinger.service file to look like below.
Using a raspberrypi PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)" NAME="Raspbian GNU/Linux" VERSION_ID="9" VERSION="9 (stretch)" VERSION_CODENAME=stretch ID=raspbian ID_LIKE=debian
Change made = ExecStart=/usr/bin/python3 -u /home/slingbox/slingbox_server.py From = ExecStart=/usr/bin/python -u slingbox_server.py
All started to work for me after that. Not sure if it's a good fix or not, but wanted to tell you about what I did to get it to start working.
Thanks!
[Unit] Description=SlingBox Server Service After=multi-user.target
[Service] Type=idle User=slingbox WorkingDirectory=/home/slingbox StandardOutput=append:/tmp/sling.log StandardError=append:/tmp/sling.log ExecStart=/usr/bin/python3 -u /home/slingbox/slingbox_server.py Restart=always
[Install] WantedBy=multi-user.target