#!/bin/bash

# shellcheck source=/dev/null
[ -e /usr/share/univention-lib/ucr.sh ] && . /usr/share/univention-lib/ucr.sh


ACTION="$1"
APP_ID="$2"  # intercom-service
APP_VERSION="$3"
ERROR_FILE="$4"



if [ -n "$action" ] && [ "$action" = "remove" ]; then 
    exit 0
fi


if [ "$action" = "update" ] || [ "$action" = "install" ]; then
    eval "$(ucr shell)"
    if ! [[ "$intercom_service_settings_proxy" =~ (true|false) ]]; then
        echo "UCR variable intercom-service/settings/proxy is neither 'true' or 'false'"
    fi
fi

