Page 1 of 1

FreeBSD crontab problem

Posted: 17 Jul 2009 23:42
by TayfuN
I'm trying to check if the vlc streaming is working or not with crontab and shell script:

#!/bin/sh
#
# Restart VLC IF died
#
if $( /usr/bin/sockstat -4 -l | /usr/bin/grep -q ":8081" ); then
echo "runing"
else
/usr/local/bin/cvlc --quiet -I dummy ....
fi 2> /dev/null 1> /dev/null &

But vlc don't starts without any erorrs in cron log. Maybe, someone can help me ? In Linux all works normally. I think, this problem with, that vlc need's somewhere to show output. Also I tried /usr/local/bin/vlc and /usr/local/bin/vlc-wrapper.

Re: FreeBSD crontab problem

Posted: 18 Jul 2009 10:50
by RĂ©mi Denis-Courmont
cvlc exits if stdin is closed. Use the normal vlc.

Re: FreeBSD crontab problem

Posted: 18 Jul 2009 13:03
by TayfuN
The same, if I run it from command line like: sh /etc/vlc.sh, all works, but cron can't run proccess, I know, that cron runing this proccess from log's, but nothing more.

Re: FreeBSD crontab problem

Posted: 18 Jul 2009 13:44
by TayfuN
Oopps... All works as you said :D Sorry :)