[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Where is Sylpheed-claws PID file?
From: |
gabev |
Subject: |
Re: Where is Sylpheed-claws PID file? |
Date: |
Fri, 12 Jan 2007 09:51:29 -0800 (PST) |
> Monit starts the programs with the same uid as it is running (unless
> 'uid' or 'gid' options are used). Monit starts programs with restricted
> environment - this is most probably the reason why sylph is running when
> the script is started by hand and not running whstarted by monit =>
> check the environment variables needed).
>
> Martin
>
so finally with help I got the wrapper to create the pid file.I named the
wrapper sylph and put it in the /etc/init.d/ .The code looks like that :
~~~~~~~~~~~~~~~~~~~
LOG_FILE=/tmp/CM_`date +%d%b%Y%H%M`.log
CM=`which sylpheed-claws`
if [ $? -ne 0 ]; then
echo "Unable to find sylpheed-claws"
exit 1
fi
case $1 in
start)
nohup $CM 1>$LOG_FILE 2>&1 &
echo $! > /tmp/sylpheed.pid
;;
stop)
kill `cat /tmp/sylpheed.pid` ;;
*)
echo "usage: sylpheed {start|stop}" ;;
esac
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I called monit from the terminal, as root, :
monit start sylpheed-claws
returns :
'sylpheed-claws' start : /etc/init.d/sylph
'sylpheed-claws' failed to start
"Monit starts programs with restricted
environment "....I modified monitrc entry to start and stop sylph as root
~~~~~~~~~~
check process sylpheed-claws with pidfile /tmp/sylpheed.pid
group mail
start program = "/etc/init.d/sylph start"
as uid dsl and gid staff
stop program = "/etc/init.d/sylph stop"
as uid root and gid root
#if failed port 25 protocol smtp then restart
#if 5 restarts within 5 cycles then timeout
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
still no go.Any more suggestions?
--
View this message in context:
http://www.nabble.com/Where-is-Sylpheed-claws-PID-file--tf2949422.html#a8302943
Sent from the monit-general mailing list archive at Nabble.com.