addon-motioneye/motioneye/rootfs/etc/cont-init.d/20-init-configuration.sh
2018-10-05 23:58:22 +02:00

12 lines
534 B
Bash

#!/usr/bin/with-contenv bash
# ==============================================================================
# Community Hass.io Add-ons: motionEye
# Creates initial motionEye configuration in case it is non-existing
# ==============================================================================
# shellcheck disable=SC1091
source /usr/lib/hassio-addons/base.sh
if ! hass.directory_exists '/data/motioneye'; then
cp -R /etc/motioneye /data/motioneye \
|| hass.die 'Failed to create initial motionEye configuration'
fi