Error running bash script in supervisor

304 views Asked by At

I have a bash script that makes some work supervising network stuff, it works great when I run it manually, but when I put it in supervisor the ifs and the whiles does not work, just stops before any of those programming sentences, echos, running cat, more and other things work just fine, but in the minute I put an if nothing else work from there on. Please give me some tips, I really need to run this script from supervisor.

1

There are 1 answers

0
Erick On BEST ANSWER

Thanks Etan Reisner, I have already fix the problem, I will put it here so if anyone else have the same problem see why. The problem was so simple (as usual) I was reading the content of text files /sys/class/net/eth0/carrier and /sys/class/net/eth0/operstate to detect when the network cable was plugged and unplugged and I was doing it with more that (I don't know why, because if I ran the script manually worked great) when was executed in supervisor stopped the execution there after the first more, I just changed to cat and that was it. Haft a day spent to solve that. Hope if someone gets into this kind of trouble find this answer and that way can solve the problem fast. Regards