[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[monit] monitor mythfrontend
From: |
Jay Cornell |
Subject: |
[monit] monitor mythfrontend |
Date: |
Wed, 21 Nov 2007 17:29:06 -0500 |
User-agent: |
Thunderbird 2.0.0.6 (X11/20071022) |
Hello. I have just recently started using monit. I have set up
processes to monitor the mythbackend and disk space and it is working
great. Very cool thank you. I am now trying to monitor the
mythfrontend to ensure it is always running on a dedicated frontend
client. I am having a problem with permissions or the environment
initialization or my weak scripting skills.
Currently the monit started mythfrontend cannot access the sound. If i
change the permission of /dev/dsp to allow other users to r/w, it
works. I would rather be able to define the user and allow the existing
permissions which only allow user and group r/w.
Here's my monitrc and the wrapper script i wrote to launch the
mythfrontend. I have been experimenting with uid and gid, but I don't
seem to be getting the same groups that the userid gets during normal login.
## monitrc
check process mythfrontend with pidfile /tmp/mfwrapper.pid
start program = "/home/jay/bin/mfwrapper start" as uid jay gid mythtv
stop program = "/home/jay/bin/mfwrapper stop" as uid jay gid mythtv
if failed host jvo port 6546
expect "MythFrontend Network Control\r\n"
then start
## mfwrapper
#!/bin/bash --login
LOG=/tmp/mfwrapper.log
PROG=/usr/bin/mythfrontend
PID=/tmp/mfwrapper.pid
export DISPLAY=:0.0
export XAUTHORITY=/home/jay/.Xauthority
export HOME=/home/jay
env >> $LOG
case $1 in
start)
echo $$ > $PID;
exec 2>>$LOG $PROG 1>>$LOG;;
stop)
kill `cat $PID` ;;
*)
echo "usage: mfwrapper {start|stop}" ;;
esac
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [monit] monitor mythfrontend,
Jay Cornell <=