mirror of
https://github.com/hassio-addons/addon-motioneye.git
synced 2025-05-06 20:21:25 +00:00
* ✨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
19 lines
820 B
Bash
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
|