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

can not install as service #35

Open
ntmedia2 opened this issue May 4, 2020 · 4 comments
Open

can not install as service #35

ntmedia2 opened this issue May 4, 2020 · 4 comments

Comments

@ntmedia2
Copy link

ntmedia2 commented May 4, 2020

may you help me to instal as service to start it when linux start

@ntmedia2
Copy link
Author

ntmedia2 commented May 4, 2020

may autorun srt-live-server when linux starts as nginx ??

@gitpierpy
Copy link

may autorun srt-live-server when linux starts as nginx ??

I think this is a general question on Linux administration, not related to this project. Check here: https://www.digitalocean.com/community/tutorials/how-to-configure-a-linux-service-to-start-automatically-after-a-crash-or-reboot-part-1-practical-examples

@Nic01as
Copy link

Nic01as commented Jun 18, 2020

hello, you need to create your service:

with systemd (if you have /etc/systemd/system/ on your linux)

create file /etc/systemd/system/srt-live-server.service

`[Unit]
Description=Srt Live Server
After=network.target syslog.target
StartLimitIntervalSec=3
StartLimitBurst=10
ConditionFileIsExecutable=/[directory]/srt-live-server/bin/sls

[Service]
Type=simple
User=root
Group=root
WorkingDirectory=/[directory]/srt-live-server
ExecStart=/[directory]/srt-live-server/bin/sls -c /etc/srt-live-server/sls.conf
Environment=
KillMode=control-group
Restart=always
RestartSec=3
StandardOutput=null
StandardError=null
SyslogIdentifier=SRT-LIVE-SERVER

[Install]
WantedBy=multi-user.target
`
you just need to add conf into this file /etc/srt-live-server/sls.conf
and change /[directory]/ with your path.

after, for add service at the startup "systemctl enable srt-live-server"
for start : "systemctl start srt-live-server"
for start : "systemctl stop srt-live-server"

you can find info about systemd with google :)

@jengajenga
Copy link

hello, you need to create your service:

with systemd (if you have /etc/systemd/system/ on your linux)

create file /etc/systemd/system/srt-live-server.service

`[Unit]
Description=Srt Live Server
After=network.target syslog.target
StartLimitIntervalSec=3
StartLimitBurst=10
ConditionFileIsExecutable=/[directory]/srt-live-server/bin/sls

[Service]
Type=simple
User=root
Group=root
WorkingDirectory=/[directory]/srt-live-server
ExecStart=/[directory]/srt-live-server/bin/sls -c /etc/srt-live-server/sls.conf
Environment=
KillMode=control-group
Restart=always
RestartSec=3
StandardOutput=null
StandardError=null
SyslogIdentifier=SRT-LIVE-SERVER

[Install]
WantedBy=multi-user.target
`
you just need to add conf into this file /etc/srt-live-server/sls.conf
and change /[directory]/ with your path.

after, for add service at the startup "systemctl enable srt-live-server"
for start : "systemctl start srt-live-server"
for start : "systemctl stop srt-live-server"

you can find info about systemd with google :)

this has worked for me. thank you very much.

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