openhab-docker/contrib/cont-init.d/40-openhabcloud

14 lines
284 B
Bash

#!/bin/bash -ex
if [ ! -z ${OHC_UUID} ]
then
mkdir -p "${OPENHAB_USERDATA}"
echo ${OHC_UUID} > "${OPENHAB_USERDATA}/uuid"
fi
if [ ! -z ${OHC_SECRET} ]
then
mkdir -p "${OPENHAB_USERDATA}/openhabcloud"
echo ${OHC_SECRET} > "${OPENHAB_USERDATA}/openhabcloud/secret"
fi