File: //var/packages/SupportService/scripts/postinst
#!/bin/bash
# Copyright (c) 2023 Synology Inc. All rights reserved.
source "$(dirname $0)"/utils
if [ "${SYNOPKG_PKG_STATUS}" = INSTALL ] && \
[ ! -f "${SUPPORT_SERVICE_SETTING_CONFIG}" ]; then
mibFastSupport=$(get_key_value "${ACTIVE_INSIGHT_SETTING_CONFIG}" mib_fast_support)
mibEnabled=$(get_key_value "${ACTIVE_INSIGHT_SETTING_CONFIG}" mib_enabled)
if [[ "yes" == ${mibFastSupport} ]]; then
"${SUPPORT_SERVICE_TOOL}" --set-fast-support yes
exit 0
fi
if [[ "no" != ${mibFastSupport} ]] && [[ "yes" == ${mibEnabled} ]]; then
"${SUPPORT_SERVICE_TOOL}" --set-fast-support yes
exit 0
fi
"${SUPPORT_SERVICE_TOOL}" --set-fast-support no
fi
UpdateActions
exit 0