* Re: check script - bad file descriptor? [not found] <AANLkTin91G9aMcV3Xg0UFNr+g5AUxX8ow+dKYF1oiUFN@mail.gmail.com> @ 2010-11-07 21:33 ` Ryan Oertel 0 siblings, 0 replies; only message in thread From: Ryan Oertel @ 2010-11-07 21:33 UTC (permalink / raw) To: supervision [-- Attachment #1: Type: text/plain, Size: 831 bytes --] I'm trying to write a check script for a service I've got installed. The Check script, when run by root returns an exit code of 0 on success and 1 on failure and does not output anything. When running "sv check mythbackend", it give me some errors, even though successful: /bin/grep: write error: Bad file descriptor ok: run: mythbackend: (pid 19728) 2287s When there is a problem, it will print the bad file descriptor error a few times per second for 7 seconds. The script is below. It seems that the check script is run in a more restrictive environment, but I can't find any documentation about this. Can anybody tell me why it works as root, but not when called through sv? check script (-rwx------ 1 root root 82 2010-11-07 14:34 check) #!/bin/bash /usr/bin/curl -s http://localhost:6544 | /bin/grep -q "MythTV Status" ^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-11-07 21:33 UTC | newest] Thread overview: (only message) (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <AANLkTin91G9aMcV3Xg0UFNr+g5AUxX8ow+dKYF1oiUFN@mail.gmail.com> 2010-11-07 21:33 ` check script - bad file descriptor? Ryan Oertel
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).