Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Api Autostart - Debian #1

Closed
bennySB opened this issue Mar 2, 2021 · 2 comments
Closed

Api Autostart - Debian #1

bennySB opened this issue Mar 2, 2021 · 2 comments

Comments

@bennySB
Copy link

bennySB commented Mar 2, 2021

Um die api automatisch bei jedem Neustart laden zu lassen, habe ich folgenden systemd-service erstellt:

`[Unit]
Description=Telerising API
After=network.target

[Service]
Type=simple
ExecStart=/opt/telerising/api & disown
WorkingDirectory=/opt/telerising
StandardOutput=inherit
StandardError=inherit
Restart=always
User=root

[Install]
WantedBy=multi-user.target`

benannt habe ich es als telerising.service, erstellt/abgelegt unter /usr/lib/systemd/system.

Nach der Erstellung ausführbar machen mit chmod 644 /lib/systemd/system/telerising.service und mit systemctl enable telerising.service + systemctl daemon-reload aktiviert.

@robtor-de
Copy link

Meine Lösung sieht ungefähr genauso aus:

[Unit]
Description=Telerising API
After=network.target
Before=tvheadend.service

[Service]
Type=simple
User=server
WorkingDirectory=/home/server/telerising/
ExecStart=/home/server/telerising/api &
Restart=always

[Install]
WantedBy=multi-user.target

Ich würde tatsächlich empfeheln das ganze aus sicherheitsgründen nicht als root laufen zu lassen, sondern einfach ein eigenen user dafür anlegen, sollte man ja prinzipiell bei jedem daemon machen
Funktioniert bei mir soweit echt super

@niyakuroneko
Copy link

alls root laufen lassen ist nicht notwendig, ich hab die api unter dem selben nutzer wie tvheadend laufen

[Unit]
Description=Zattoo API

[Service]
User=hts
Group=hts
WorkingDirectory=/home/hts/telerising
Type=simple
ExecStart=/home/hts/telerising/api
Before=tvheadend

[Install]
WantedBy=multi-user.target

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants