diff --git a/docker/docker-compose-empty-dev.yml b/docker/docker-compose-empty-dev.yml deleted file mode 100644 index af64d619..00000000 --- a/docker/docker-compose-empty-dev.yml +++ /dev/null @@ -1,22 +0,0 @@ - ---- -version: "3" -services: - motionui-dev: - container_name: motionui-dev - image: motionui-dev - build: - context: . - dockerfile: Dockerfile - args: - env: devel - fqdn: motionui-dev.localhost - restart: unless-stopped - ports: - - "8888:8080" - volumes: - - /etc/localtime:/etc/localtime:ro - - /var/lib/docker/volumes/motionui-dev-logs:/var/log/nginx - - /var/lib/docker/volumes/motionui-dev-www:/var/www/motionui - - /var/lib/docker/volumes/motionui-dev-data:/var/lib/motionui - - /var/lib/docker/volumes/motionui-dev-captures:/var/lib/motion diff --git a/docker/init b/docker/init index d41859e4..e37b61a0 100644 --- a/docker/init +++ b/docker/init @@ -6,7 +6,6 @@ GO2RTC_DIR="/var/lib/motionui/go2rtc" # Make sure motion service is stopped /usr/sbin/service motion stop -killall motion /bin/bash $WWW_DIR/bin/motionui -p & chown -R www-data:motionui $DATA_DIR diff --git a/www/update/database/5.0.0.php b/www/update/database/5.0.0.php index 7643962b..a9749de9 100644 --- a/www/update/database/5.0.0.php +++ b/www/update/database/5.0.0.php @@ -4,6 +4,7 @@ */ $mycameraController = new \Controllers\Camera\Camera(); $mymotionConfigController = new \Controllers\Motion\Config(); +$mymotionServiceController = new \Controllers\Motion\Service(); $mygo2rtcController = new \Controllers\Go2rtc\Go2rtc(); /** @@ -171,8 +172,10 @@ } // Trigger motion restart - if (!file_exists(DATA_DIR . '/motion.restart')) { - touch(DATA_DIR . '/motion.restart'); + if ($mymotionServiceController->isRunning() === true) { + if (!file_exists(DATA_DIR . '/motion.restart')) { + touch(DATA_DIR . '/motion.restart'); + } } }