addon-motioneye/motioneye/rootfs/etc/cont-init.d/31-motion.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
820 B
Bash

#!/usr/bin/with-contenv bash
# ==============================================================================
# Community Hass.io Add-ons: motionEye
# Configure motion webcontrol access
# ==============================================================================
# shellcheck disable=SC1091
source /usr/lib/hassio-addons/base.sh
readonly motion='/data/motioneye/motion.conf'
if hass.config.true 'motion_webcontrol'; then
hass.log.info "Enabling motion webcontrol..."
hass.log.warning "This opens up an UNSECURE port to the outside world!"
hass.log.warning "This port has NO SSL & NO AUTHENICATION!"
hass.log.warning "YOU HAVE BEEN WARNED!"
sed -i "s/webcontrol_localhost on/webcontrol_localhost off/" "$motion"
else
sed -i "s/webcontrol_localhost off/webcontrol_localhost on/" "$motion"
fi