Page 1 of 1

hi pls hellp

Posted: 2013/04/16 08:55:06
by karmw
i add new centos 5
But got problem is

I used a ubantu Previously
and i used a - script to monitor programs in the case of stop re-run

Example
Use this script

....................................................................
if ps x |grep -v grep |grep -c cccam >/dev/null
then
echo "cccam... ok"
else
echo "cccam... restarting"
/bin/cccam -C /var/etc/CCcam.cfg &
printf " \n `date +%d/%m/%Y-%Hh%Mm%Ss` : CCcam Restarted\n" >> /var/bin/Check_CCcam.txt
fi
.................................................................
He worked in ubantu

But now in centos not work

please hellp

Re: hi pls hellp

Posted: 2013/04/16 10:19:38
by TrevorH
So what does it do?

Re: hi pls hellp

Posted: 2013/04/16 16:44:34
by karmw
HI

I WANT script to monitor programs in the case of stop re-run

Re: hi pls hellp

Posted: 2013/04/16 16:51:45
by TrevorH
No, I mean that just saying "But now in centos not work" does not tell us anything even remotely useful about why it does not work. How about some error messages or the output of your script? I can see by reading it what you want it to do. I cannot see your screen to see what goes wrong!

Re: hi pls hellp

Posted: 2013/04/16 17:10:25
by karmw
i have program sharing name this program cccam + oscam this progarm bad stop Automatic

i add on ubantu scripts for monitor programs in the case of stop re-run

i add same this scripts on centos not work

hi pls hellp

Posted: 2013/04/16 17:19:46
by gerald_clark
Repeating the same non-information will not get a different response.

Re: hi pls hellp

Posted: 2013/04/16 18:27:46
by TrevorH
Yes, we know that. You need to tell us [u]how[/u] it is not working! You need to get error messages. You need to understand what the script does and then you can run it line by line manually and find out where it is going wrong. Just posting continually "it does not work" does not tell us [u]anything[/u] about what is going wrong.

Re: hi pls hellp

Posted: 2013/04/16 18:55:20
by karmw
hi
Does not show any error ..
....

I want a way
If a program stops - works automatically

Re: hi pls hellp

Posted: 2013/04/16 19:02:40
by karmw
[quote]
TrevorH wrote:
Yes, we know that. You need to tell us [u]how[/u] it is not working! You need to get error messages. You need to understand what the script does and then you can run it line by line manually and find out where it is going wrong. Just posting continually "it does not work" does not tell us [u]anything[/u] about what is going wrong.[/quote]

thnx you

hi
Does not show any error ..
....

I want a way
If a program stops - works automatically
on centos 64 bit

Re: hi pls hellp

Posted: 2013/04/16 19:15:01
by karmw
i have this script
#################################################################
if ps x |grep -v grep |grep -c cccam >/dev/null
then
echo "cccam... ok"
else
echo "cccam... restarting"
/bin/cccam -C /var/etc/CCcam.cfg &
printf " \n `date +%d/%m/%Y-%Hh%Mm%Ss` : CCcam Restarted\n" >> /var/bin/Check_CCcam.txt
fi
#################################################################
work good on ubantu

not work on centos

----
Does not show any error .. on centos
....

I want a way
If a program stops - works automatically
on centos 64 bit