#!/usr/bin/with-contenv bashio
# ==============================================================================
# Start HomeMatic HMServer service
# ==============================================================================
# shellcheck disable=SC2086
if bashio::config.true 'hmip_enable'; then
    bashio::log.info "Starting HMIPServer..."
    exec java -Xmx64m -Dlog4j.configuration=file:///etc/config/log4j.xml -Dfile.encoding=ISO-8859-1 -jar /opt/HMServer/HMIPServer.jar /etc/config/crRFD.conf /etc/config/HMServer.conf
else
    bashio::log.info "Starting HMServer..."
    exec java -Xmx64m -Dlog4j.configuration=file:///etc/config/log4j.xml -Dfile.encoding=ISO-8859-1 -jar /opt/HMServer/HMServer.jar /etc/config/HMServer.conf
fi
