blob: 9ba6f4a341988a2c693971c52c1d0dcde74bb340 [file] [log] [blame]
#!/bin/sh
case "$1" in
start)
mkdir -p /tmp/cwmp/monitoring/dejittering
mkdir -p /tmp/cwmp/monitoring/epg
mkdir -p /tmp/cwmp/monitoring/hdmi
mkdir -p /tmp/cwmp/monitoring/tcp
mkdir -p /tmp/cwmp/monitoring/ts
chmod 777 /tmp/cwmp/monitoring /tmp/cwmp/monitoring/*
babysit 60 cwmp_monitor | logos cwmp_monitor &
# With default CWMPRetryIntervalMultiplier, CWMP
# maximum exponential backoff is 5120 seconds.
# Set the alivemonitor to somewhat longer than that.
babysit 60 \
alivemonitor /tmp/cwmp/acscontact 300 180 7200 \
cwmpd 2>&1 | logos cwmpd 0 20000000 &
;;
stop)
pkillwait -x cwmpd
pkillwait -f 'alivemonitor.*cwmpd'
pkillwait -x cwmp_monitor
;;
restart)
$0 stop; $0 start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac