#!/bin/sh

. /etc/init.d/globals

case $1 in
	start)
		if [ -e /var/etc/.inadyn ]; then
			/usr/sbin/inadyn --cache-dir=/tmp/.inadyn
		fi
	;;
	stop)
		if [ -e /var/etc/.inadyn ]; then
			pid=$(cat /var/run/inadyn.pid 2>/dev/null)
			test -n "$pid" && kill $pid || true
		fi
	;;
	*)
		echo "[${BASENAME}] Usage: $0 {start|restart|stop}"
	;;
esac
