diff --git a/README.md b/README.md index 1774100..f17f62b 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,7 @@ Some cool features of motionEye: - Supports uploading recording into Google Drive and Dropbox. - motion detection, including email notification and scheduling. - Can record continuously, motion, or timelapse, with retention settings. +- Supports "![action buttons](https://github.com/ccrisan/motioneye/wiki/Action-Buttons)" by adding scripts to the config/motioneye directory (recommend using either the ssh or samba addon to achieve this). ## Installation diff --git a/motioneye/config.json b/motioneye/config.json index d0a9175..95b5f9b 100755 --- a/motioneye/config.json +++ b/motioneye/config.json @@ -33,6 +33,7 @@ "SYS_ADMIN" ], "map": [ + "config:rw", "share:rw", "ssl" ], diff --git a/motioneye/rootfs/etc/cont-init.d/motioneye.sh b/motioneye/rootfs/etc/cont-init.d/motioneye.sh index 5f9ae9b..ce18298 100644 --- a/motioneye/rootfs/etc/cont-init.d/motioneye.sh +++ b/motioneye/rootfs/etc/cont-init.d/motioneye.sh @@ -6,11 +6,17 @@ readonly CONF='/data/motioneye/motioneye.conf' readonly MOTION='/data/motioneye/motion.conf' -if ! bashio::fs.directory_exists '/data/motioneye'; then - cp -R /etc/motioneye/ /data/motioneye/ \ +# Ensure configuration exists +if ! bashio::fs.directory_exists '/config/motioneye'; then + mkdir -p /config/motioneye \ || bashio::exit.nok 'Failed to create initial motionEye configuration' + + # Copy in template files + cp /etc/motioneye/* /config/motioneye/. fi + + # Migration if bashio::fs.file_exists "${CONF}"; then bashio::log.debug "Running startup migrations" diff --git a/motioneye/rootfs/etc/motioneye/motioneye.conf b/motioneye/rootfs/etc/motioneye/motioneye.conf index 89f5172..b547d5f 100644 --- a/motioneye/rootfs/etc/motioneye/motioneye.conf +++ b/motioneye/rootfs/etc/motioneye/motioneye.conf @@ -1,6 +1,6 @@ # path to the configuration directory (must be writable by motionEye) -conf_path /data/motioneye +conf_path /config/motioneye # path to the directory where pid files go (must be writable by motionEye) run_path /var/run diff --git a/motioneye/rootfs/etc/services.d/motioneye/run b/motioneye/rootfs/etc/services.d/motioneye/run index e8cbfa9..7235545 100644 --- a/motioneye/rootfs/etc/services.d/motioneye/run +++ b/motioneye/rootfs/etc/services.d/motioneye/run @@ -8,7 +8,7 @@ declare -a options bashio::log.info "Starting motionEye..." -options+=(-c /data/motioneye/motioneye.conf) +options+=(-c /config/motioneye/motioneye.conf) # Enable debug mode if bashio::debug; then