Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 Sep 2011 20:21:05 +0000
From:      "Philip M. Gollucci" <pgollucci@p6m7g8.com>
To:        Gabor Kovesdan <gabor@freebsd.org>
Cc:        Matthias Andree <matthias.andree@gmx.de>, lev@freebsd.org, freebsd <freebsd-ports@freebsd.org>, ports-list
Subject:   Re: Re-starting daemons across upgrades?
Message-ID:  <4E73AFB1.2080406@p6m7g8.com>
In-Reply-To: <4E73AADB.8060804@FreeBSD.org>
References:  <20110912230943.GD33455@guilt.hydra>	<4E6E99BC.4050909@missouri.edu>	<1315905051.1747.208.camel@xenon>	<4E6F8A50.9060205@gmx.de>	<1315942042.1747.258.camel@xenon>	<4E6FD71D.9010207@gmx.de>	<20110914181553.f6d31b0f.cjr@cruwe.de>	<4E722F3F.3030606@wasikowski.net>	<20110915180815.GA46983@guilt.hydra>	<4E7247F2.7080207@wasikowski.net>	<20110915183710.GA47127@guilt.hydra>	<4E7253AF.7030602@wasikowski.net>	<4E725782.3090107@gmx.de>	<CADLo839_KJZGpjYcdFM1a3jqGCg4EHrz08xnNEQ30uW2c4uz7w@mail.gmail.com>	<CAGMYy3vugL=YVqzH6-u81dLitgZU55tEnuuBnfqwyg86Wf9t3g@mail.gmail.com>	<46157122.20110916135126@serebryakov.spb.ru>	<4E73709D.5020004@gmx.de> <4E73AADB.8060804@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 09/16/11 20:00, Gabor Kovesdan wrote:
> #!/bin/sh
> PID_FILE="/var/db/mysql/server.mypc.hu.pid"
> PID=`cat $PID_FILE`
> EXECUTABLE="/usr/local/etc/rc.d/mysql-server start"
> 
> if test -r $PID_FILE ; then
>         # pidfile exist, is it correct?
>         if kill -CHLD $PID >/dev/null 2>&1; then
>                 # ok, exit silently
>                 exit 0
>         fi
>         rm -f $PID_FILE
> fi
> echo ""
> echo "Couldn't find the MySQL server running, retsarting.."
> echo ""
> $EXECUTABLE

#!/bin/sh

PIDS=$(/usr/bin/pgrep rsyslogd)
if [ $? -eq 1 ]; then
    /usr/bin/killall rsyslogd 2>/dev/null
    /usr/local/etc/rc.d/rsyslogd start >/dev/null
else
    exit 1
fi
exit 0





-- 
------------------------------------------------------------------------
1024D/DB9B8C1C B90B FBC3 A3A1 C71A 8E70  3F8C 75B8 8FFB DB9B 8C1C
Philip M. Gollucci (pgollucci@p6m7g8.com) c: 703.336.9354
VP Infrastructure,                Apache Software Foundation
Committer,                        FreeBSD Foundation
Consultant,                       P6M7G8 Inc.
Director Operations,              Ridecharge Inc.

Work like you don't need the money,
love like you'll never get hurt,
and dance like nobody's watching.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4E73AFB1.2080406>