addon-motioneye/motioneye/rootfs/etc/cont-init.d/20-init-configuration.sh
Joakim Sørensen d59990a506 Adds option to enable motion webcontrol (#17)
* Adds motion webcontrol

* ⬆️ Upgrades motion to version 4.1.1-r1

* ⬆️ Upgrades nginx to version 1.14.2-r0

* ⬆️ Upgrades ffmpeg to version 4.0.2-r0

* 🔨 Configuration cleanup

*  Rename motion_api to motion_webcontrol

* 📝Adds documentation for motion_webcontrol

* ✏️ Updated documentation

* ✏️ Spelling

* ⚠️ Added warning logs
2019-02-04 21:12:05 +01:00

19 lines
No EOL
767 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
# Needed for existing installations.
if ! hass.file_exists '/data/motioneye/motion.conf'; then
cp /etc/motioneye/motion.conf /data/motioneye/motion.conf \
|| hass.die 'Failed to create initial motion configuration'
fi