From: Ryan Oertel <ryan.oertel@gmail.com>
To: supervision@list.skarnet.org
Subject: Re: check script - bad file descriptor?
Date: Sun, 7 Nov 2010 15:33:10 -0600 [thread overview]
Message-ID: <AANLkTi=PtDt4X9bpzdjcny1LTuH5tPN9q4ffNDrg+weX@mail.gmail.com> (raw)
In-Reply-To: <AANLkTin91G9aMcV3Xg0UFNr+g5AUxX8ow+dKYF1oiUFN@mail.gmail.com>
[-- 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"
parent reply other threads:[~2010-11-07 21:33 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <AANLkTin91G9aMcV3Xg0UFNr+g5AUxX8ow+dKYF1oiUFN@mail.gmail.com>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='AANLkTi=PtDt4X9bpzdjcny1LTuH5tPN9q4ffNDrg+weX@mail.gmail.com' \
--to=ryan.oertel@gmail.com \
--cc=supervision@list.skarnet.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).