#!/usr/bin/with-contenv bashio
# ==============================================================================
# Start ozw-admin
# ==============================================================================
OZW_CONFIG=/data/ozw/config

# Wait until ozw is up and running
bashio::net.wait_for 1983
bashio::log.info "Starting ozw-admin..."

cd /data/ozw || bashio::exit.nok "Could not change to OZW working directory"
exec ozwadmin \
    -platform vnc:size=1024x768:port=5900 \
    —-host "localhost:1983" \
    --config-dir "${OZW_CONFIG}" \
    --user-dir "${OZW_CONFIG}"
