From 90581f9b8ab7a6b782297fdacc1bbd703df2b6b8 Mon Sep 17 00:00:00 2001 From: ben Date: Thu, 7 Sep 2023 02:18:54 +0000 Subject: [PATCH] Update 'root/usr/libexec/apps/motioneye/motioneye.sh' --- root/usr/libexec/apps/motioneye/motioneye.sh | 79 +++++++++----------- 1 file changed, 37 insertions(+), 42 deletions(-) diff --git a/root/usr/libexec/apps/motioneye/motioneye.sh b/root/usr/libexec/apps/motioneye/motioneye.sh index ec0ca18..f17887e 100755 --- a/root/usr/libexec/apps/motioneye/motioneye.sh +++ b/root/usr/libexec/apps/motioneye/motioneye.sh @@ -4,7 +4,7 @@ ACTION=${1} shift 1 get_image() { - IMAGE_NAME="ccrisan/motioneye:master-amd64" + IMAGE_NAME=$(uci get motioneye.@motioneye[0].image_name 2>/dev/null) } do_install_detail() { @@ -12,67 +12,50 @@ do_install_detail() { local port=`uci get motioneye.@motioneye[0].port 2>/dev/null` local IMAGE_NAME=`uci get motioneye.@motioneye[0].image_name 2>/dev/null` - #Generate the generic environment variables for the docker-compose - - GEN_PASS=$(< /dev/urandom tr -dc A-Za-z0-9 2>/dev/null | head -c14; echo) - GEN_PASS2=$(< /dev/urandom tr -dc A-Za-z0-9 2>/dev/null | head -c14; echo) - - # Get our local LAN IP Address LAN_IP=$(uci get network.lan.ipaddr) - # Strip trailing network mask LAN_IP="${LAN_IP%/*}" - + if [ -z "$config" ]; then - echo "config path is empty!" - exit 1 + echo "config path is empty!" + exit 1 fi [ -z "$port" ] && port=8808 [ -z "$IMAGE_NAME" ] && IMAGE_NAME=ccrisan/motioneye:master-amd64 - - # Create Docker Compose file with custom variables - - # Create Docker Compose file with custom variables -touch docker-compose.yml -cat > docker-compose.yml < /opt/docker2/compose/motioneye-app/docker-compose.yml <