#!/bin/bash
. /var/config/ps2.conf

cd /var/config
#ps -aux | wc -l | tr -d
ps -aux | wc -l | tr -d > /var/config/ps.conf
awk ' { print "e=" $0 } ' ps.conf > ps2.conf
# Correcting you sleep number w=xxx

w=58

if [ $e -lt $w ]
then
/etc/init.d/timecheck
echo `date +%H:%M` > /dev/dbox/fp0
echo "sleep"
else
/etc/init.d/timecheck
fi