#!/bin/sh
# Arg: 1
# x11vnc - postinst
#!/bin/sh -e
if [ x"$D" = "x" ]; then
    [ ! -e /etc/x11vnc.passwd ] && x11vnc -storepasswd 42000 /etc/x11vnc.passwd
else
    exit 1
fi
# Begin section update-rc.d
if type update-rc.d >/dev/null 2>/dev/null; then
	if [ -n "$D" ]; then
		OPT="-r $D"
	else
		OPT="-s"
	fi
	update-rc.d $OPT x11vnc start 90  . stop 90 0 1 6 .
fi
# End section update-rc.d