Hi, > Why not something like 'echo "sta client=$1" | bconsole -c ... | grep > -q ...' and check the return code? Much simpler and uses less resources. > executing it from command line (and from a script changing "client-fd" by $1 using Run Before Job = "/etc/bacula/scripts/check-status-client.sh '%c'"):
echo "sta client=client-fd" | bconsole | grep -q "Failed to connect to Client" ; echo $? I get value 1 if bacula can connect with client and value 0 is not, so exit would be 1 if OK and 0 if ERROR... correct?? > So this lines... > In some document, I read if script exit with value different from 0 > > would mean script had exited with error and job won't run (in other > > words, bacula would not try to connect with client). are false... ------------------------------------------------------------------------------ Register Now & Save for Velocity, the Web Performance & Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance & Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf _______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users