# On Azure/Hyper-V systems start the hv_kvp_daemon
#
description "Hyper-V KVP Protocol Daemon"
author "Adam Conrad <adconrad@canonical.com>"

start on runlevel [2345]
stop on runlevel [!2345]
console log

pre-start script
        if [ -e "/etc/default/hv-kvp-daemon-init" ]; then
                . /etc/default/hv-kvp-daemon-init
        fi
        [ "$RUN_DAEMON" -eq 0 ] && { stop; exit 0; }
        [ -x /usr/sbin/hv_kvp_daemon ] || { stop; exit 0; }
end script

exec /usr/sbin/hv_kvp_daemon
