net-nds/fedora-ds-base: repoman cleanup & new init script with spawn process check

git-svn-id: https://svn.disconnected-by-peer.at/svn/linamh/trunk/linamh@438 6952d904-891a-0410-993b-d76249ca496b
This commit is contained in:
geos_one
2008-07-31 19:21:08 +00:00
parent 67a7790dcc
commit 339797de35
5 changed files with 132 additions and 43 deletions

View File

@@ -44,12 +44,14 @@ start() {
eend 0
for instance in $FDSINSTANCES ; do
ebegin "Starting Instance $instance"
start-stop-daemon --start --quiet \
--pidfile $piddir/slapd-$instance.pid \
start-stop-daemon --start --quiet -m \
--pidfile $piddir/slapd-$instance.startpid \
--exec $exec -- -D $instbase/slapd-$instance \
-i $piddir/slapd-$instance.pid -w $piddir/slapd-$instance.startpid
eend $?
done
sleep 5
status || return 1
}
@@ -82,7 +84,7 @@ status() {
for instance in $INSTANCES; do
if [ -e $piddir/slapd-$instance.pid ]; then
pid=$(cat $piddir/slapd-$instance.pid)
if [ $(echo "$pids" | grep -c $pid) -ge 1 ]; then
if [ $(echo "$pid" | grep -c $pid) -ge 1 ]; then
einfo "$prog $instance (pid $pid) is running..."
else
ewarn "$prog $instance dead but pid file exists"