mirror of
https://github.com/RIPE-NCC/ripe-atlas-software-probe.git
synced 2024-05-11 05:55:02 +00:00
Restart perd, eperd, eooqd if they die.
This commit is contained in:
@@ -91,6 +91,7 @@ $KILL_PERDS_CMD
|
||||
|
||||
# the system part is done. now set env for ATLAS.
|
||||
rm -f $STATUS_DIR/*.vol
|
||||
rm -f $RUN_DIR/*.vol
|
||||
|
||||
# Crontabs may be bad enough that we can't actually do anything. Delete them
|
||||
# after too many failed boots
|
||||
@@ -136,9 +137,23 @@ mkdir -p $DATA_DIR/oneoff
|
||||
$CHOWN_FOR_MSM
|
||||
$CHMOD_FOR_MSM
|
||||
|
||||
perd -c $BASE_DIR/crons/main -A 9801 -P $RUN_DIR/perd-main.pid.vol
|
||||
eperd -c $BASE_DIR/crons/7 -A 9807 -P $RUN_DIR/perd-7.pid.vol -O /home/atlas/data/new/7 -i 7
|
||||
eooqd $BASE_DIR/crons/oneoff -A 9809 -P $RUN_DIR/eooqd.pid.vol -i 9 &
|
||||
start_perd()
|
||||
{
|
||||
perd -c $BASE_DIR/crons/main -A 9801 -P $RUN_DIR/perd-main.pid.vol
|
||||
}
|
||||
start_eperd()
|
||||
{
|
||||
eperd -c $BASE_DIR/crons/7 -A 9807 -P $RUN_DIR/perd-7.pid.vol -O /home/atlas/data/new/7 -i 7
|
||||
}
|
||||
start_eooqd()
|
||||
{
|
||||
eooqd $BASE_DIR/crons/oneoff -A 9809 -P $RUN_DIR/eooqd.pid.vol -i 9 &
|
||||
}
|
||||
|
||||
start_perd
|
||||
start_eperd
|
||||
start_eooqd
|
||||
|
||||
|
||||
$NTPCLIENT_CMD &
|
||||
|
||||
@@ -295,6 +310,34 @@ do
|
||||
$RESOLVCONF_CMD
|
||||
fi
|
||||
|
||||
# Check if perd is still running
|
||||
if check_pid $(cat $RUN_DIR/perd-main.pid.vol)
|
||||
then
|
||||
: # perd is running
|
||||
else
|
||||
echo restarting perd
|
||||
start_perd
|
||||
echo "RESULT 9801 perd died (restarted)" >> $DATA_NEW_DIR/simpleping
|
||||
fi
|
||||
# Check if eperd is still running
|
||||
if check_pid $(cat $RUN_DIR/perd-7.pid.vol)
|
||||
then
|
||||
: # eperd is running
|
||||
else
|
||||
echo restarting eperd
|
||||
start_eperd
|
||||
echo "RESULT 9807 eperd died (restarted)" >> $DATA_NEW_DIR/simpleping
|
||||
fi
|
||||
# Check if eooqd is still running
|
||||
if check_pid $(cat $RUN_DIR/eooqd.pid.vol)
|
||||
then
|
||||
: # eooqd is running
|
||||
else
|
||||
echo restarting eooqd
|
||||
start_eooqd
|
||||
echo "RESULT 9809 eooqd died (restarted)" >> $DATA_NEW_DIR/simpleping
|
||||
fi
|
||||
|
||||
sync
|
||||
$DROP_CACHES
|
||||
done
|
||||
|
||||
@@ -13,6 +13,10 @@ rchoose()
|
||||
{
|
||||
$BB_BIN_DIR/rchoose "$@"
|
||||
}
|
||||
check_pid()
|
||||
{
|
||||
$SU_CMD kill -0 "$@"
|
||||
}
|
||||
condmv()
|
||||
{
|
||||
$BB_BIN_DIR/condmv "$@"
|
||||
|
||||
Reference in New Issue
Block a user