#!/bin/sh

PPPOEPLAN=/usr/ramdisk/bin/ipe_pppoeplan

if [ "$1" = "start" ]; then
	echo "OK"
elif [ "$1" = "stop" ]; then
	# kill monitor if it exists
	ps ax | grep ipe_pppoeplan | awk '{print $1, $6}' | \
	while read pid path; do
		if [ "${path}" = "${PPPOEPLAN}" ]; then
			kill -9 ${pid}
			echo "ddns is stopped!"
		fi
	done
fi
