[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Where is Sylpheed-claws PID file?

From: Martin Pala
Subject: Re: Where is Sylpheed-claws PID file?
Date: Wed, 10 Jan 2007 11:28:39 +0100
User-agent: Thunderbird (X11/20061222)

gabev wrote:

Martin Pala wrote:
Usually just daemons create a pidfile - user oriented programs such as email clients rarely.

Generally you can create the pidfile yourself for any program, see monit FAQ - question/answer no. 3 (


gabev wrote:
Hi there,

I use monit on dsl linux and I'm having problems finding the PID file of
sylpheed-claws email client.I can see that it has a pid by using the ps
command but I cant find the file itself.Any

To unsubscribe:

Hi Martin

I created a wrapper for Sylpheed-Claws named sylph and put it in
/usr/bin/.The contents of sylph are:

export JAVA_HOME=/usr/bin/ CLASSPATH=sylpheed-claws:.

          case $1 in
           echo $$ > /var/run/;
           exec 2>&1 sylpheed-claws -cp ${CLASSPATH} org.something.with.main
1>/var/run/sylpheed.out ;; stop) kill `cat /var/run/` ;; *) echo "usage: sylpheed {start|stop}" ;;

Now from the terminal , logged in as root,  I can start sylpheed-claws by
issuing the command "sylph start" .If I start monit as daemon  ( monit -d 60
) sylpheed-claws is not started.In the monitrc file this is the entry for
sylpheed :

check process sylpheed-claws with pidfile /var/run/
   group mail
start program = "/usr/bin/sylph start"
   stop program = "/usr/bin/sylph stop"
   #if failed port 25 protocol smtp then restart
   #if 5 restarts within 5 cycles then timeout

I cannot start or stop the sylpheed-claws service through the web
interface.I get the Execution failed status.One little detail, I always run
sylpheed as root, maybe thats why  monit cannot start it?

The example in monit FAQ is just for imaginary java application. You need to customize the script for your application.

The JAVA_HOME, CLASSPATH and the "exec java -cp ${CLASSPATH} org.something.with.main" in the example are not monit related - it sets the environment for the application, the exec is specific command to invoke the given java application.

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).


reply via email to

[Prev in Thread] Current Thread [Next in Thread]