. /usr/syno/bin/jsoncmd

importPath=$(jget "${SYNOPKG_BKP_INPUT}" ".temp_path")
if [ $? -ne 0 ];then
        jerr "bad parameters"
        exit 1
fi

restore()
{
        local WEBDAV_SERVER_CONF_DIR="${SYNOPKG_PKGPATH}/target/etc"

        if [ -d ${importPath} -a -d ${WEBDAV_SERVER_CONF_DIR} ];then
                /bin/cp -f ${importPath}/* ${WEBDAV_SERVER_CONF_DIR}
        fi
}

main()
{
        restore

        exit 0
}
main

