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

patch rtsp watchdog #338

Open
wants to merge 2 commits into
base: xf-data
Choose a base branch
from

Conversation

freeznk9
Copy link

@freeznk9 freeznk9 commented Apr 6, 2018

when RTSP Server "snx_rtsp_server" was hang, watchdog will start rtsp server.

added RTSP Server Watchdog
Added RTSP Server Watchdog
@carmenchui
Copy link

Thank you for this. I was having issues where my cameras' RTSP servers would hang and I'd have to always restart the RTSP server manually. Now I can just leave it alone and the stream will still stay up.

@effendieffendi
Copy link

Hi, sorry but I'm completely green in linux. Can you explain how to do it step by step? thx

@Bechrissed
Copy link

Nice feature, why doesn't this get merged? Is the project abandoned?

while :
do
sleep 10
if pgrep -x "snx_rtsp_server" > /dev/null
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will have the 'problem' that it will start the RTSP server even if you manually stopped it.

Sorry for resurfacing this, but I implemented the exact same script before checking the open pull requests, and I had that issue.

Maybe you could check the existence of the /var/run/rtsp-server.pid file and check the enclosed PID?

@mirjef
Copy link

mirjef commented Oct 1, 2019

when RTSP Server "snx_rtsp_server" was hang, watchdog will start rtsp server.

I can't get this to work, please advise.
What I have done:
I have uploaded both files (30-rtsp-watchdog and fang-rtsp-watchdog.sh) to the named directories on my hacked Xiaofang S1. I SSH-ed into the cam and gave the .sh file 766 permissions with the chmod command. After reboot an extra line '30-rtsp-watchdog' appears in 'manage scripts'. So far so good.
The problem is the button Start does not work and the status remains red[NOK].

What am i doing wrong?

@gokuu
Copy link

gokuu commented Oct 1, 2019

Have you tried running both fang-rtsp-watchdog.sh and 30-rtsp-watchdog manually, and see if it raises an error?

@mirjef
Copy link

mirjef commented Oct 2, 2019

Have you tried running both fang-rtsp-watchdog.sh and 30-rtsp-watchdog manually, and see if it raises an error?

Thx for reply!!
I just tried this. I get the error:
-sh: /media/mmcblk0p2/data/etc/scripts/30-rtsp-watchdog: not found
same for the .sh file.

FTP shows the files are in the right directories. I checked the permissions on both files and they are:
-rwxrw-rw-

I can't figure out what the problem is

@gokuu
Copy link

gokuu commented Oct 2, 2019 via email

@mirjef
Copy link

mirjef commented Oct 2, 2019

tried adding 'set x' as first command. Same result:
-sh: 30-rtsp-watchdog: not found

when I try ls command, the file 30-rtsp-watchdog is listed in this directory
Any ideas?

@gokuu
Copy link

gokuu commented Oct 2, 2019 via email

@mirjef
Copy link

mirjef commented Oct 2, 2019

@gokuu Thanx for your help!! I finally found my (stupid) mistake. I used the wrong text editor which added control characters to line endings, causing the errors. Fixed it and it seems to be working fine now. Thanx again!!

@gokuu
Copy link

gokuu commented Oct 2, 2019 via email

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

Successfully merging this pull request may close these issues.

None yet

6 participants