mkdir -p /var/log/acp
mkdir -p /mnt/logs/acp

if test -z "`pidof acp_logd`"
then
    /usr/local/acp/bin/acp_logd
fi

if test -z "`pidof acp_logrotated`"
then
    /usr/local/acp/bin/acp_logrotated
fi

if test -z "`pidof acp_exp_mgrd`"
then
    /usr/local/acp/bin/acp_exp_mgrd
fi

if test -z "`pidof acp_evnt_cntr`"
then
    /usr/local/acp/bin/acp_evnt_cntr
fi

if test -z "`pidof acp_ifd`"
then
    /usr/local/acp/bin/acp_ifd
fi

if test -f "/mnt/logs/bootcount_p"
then
BOOTCNT_P="`cat /mnt/logs/bootcount_p`"
else
BOOTCNT_P="NONE"
fi

if test -f "/mnt/logs/bootcount_b"
then
BOOTCNT_B="`cat /mnt/logs/bootcount_b`"
else
BOOTCNT_B="NONE"
fi

/usr/local/acp/bin/acp_logger -l "Start of day=`uptime`:bp=`echo $BOOTCNT_P`,bb=`echo $BOOTCNT_B`" -p info
