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

Re: restarting ipropd-master



On Tue, Oct 11, 2005 at 09:53:04AM +0200, Antoine Jacoutot wrote:
> Thanks, I think this is indeed the right way to go for now.
> How do you check if the master is back, do you just ping the master 
> computer or do you connect to it's iprod port ?

Well, it's Linux, even Debian, specific, but I do this:

     if [ -r /var/run/ipropd-slave.pid ] ; then
       if [ -r /proc/`cat /var/run/ipropd-slave.pid`/stat ];then exit 0;fi
     fi
     restart ipropd-slave

If there is no /var/run/ipropd-slave.pid, then ipropd-slave isn't
running, and so should be started.  If it is there, then I check
in /proc to see that it's still running, and if so I exit.

To restart ipropd-slave, I do this:

     . /etc/default/heimdal-kdc
     start-stop-daemon --start --quiet --background --make-pidfile \
      --pidfile /var/run/ipropd-slave.pid --exec /usr/sbin/ipropd-slave \
      -- "$SLAVE_PARAMS"

which is Debian specific, I'm sure.

     -- Owen
     LeBlanc@mcc.ac.uk