diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 94d4b998..e947a3fa 100755 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -24,7 +24,7 @@ // "--network=host", ], // ATTENTION: If running with --network=host, COMMENT `forwardPorts` OR ELSE THERE WILL BE NO WEBUI! - "forwardPorts": [20211, 20212, 5678], + "forwardPorts": [20211, 20212, 5678], "portsAttributes": { // the ports we care about "20211": { "label": "Frontend:Nginx+PHP" diff --git a/.devcontainer/resources/devcontainer-Dockerfile b/.devcontainer/resources/devcontainer-Dockerfile index 03c91b77..28fd8c38 100755 --- a/.devcontainer/resources/devcontainer-Dockerfile +++ b/.devcontainer/resources/devcontainer-Dockerfile @@ -17,7 +17,7 @@ ENV PYDEVD_DISABLE_FILE_VALIDATION=1 COPY .devcontainer/resources/devcontainer-overlay/ / # Install common tools, create user, and set up sudo -RUN apk add --no-cache git nano vim jq php83-pecl-xdebug py3-pip nodejs sudo gpgconf pytest pytest-cov fish shfmt sudo +RUN apk add --no-cache git nano vim jq php83-pecl-xdebug py3-pip nodejs sudo gpgconf pytest pytest-cov fish shfmt github-cli RUN install -d -o netalertx -g netalertx -m 755 /services/php/modules && \ cp -a /usr/lib/php83/modules/. /services/php/modules/ && \ diff --git a/.devcontainer/scripts/generate-configs.sh b/.devcontainer/scripts/generate-configs.sh index b3dca0bd..ee8e249c 100755 --- a/.devcontainer/scripts/generate-configs.sh +++ b/.devcontainer/scripts/generate-configs.sh @@ -6,10 +6,6 @@ # Run this script after modifying the resource Dockerfile to refresh # the final .devcontainer/Dockerfile used by the devcontainer. -# Make a copy of the original Dockerfile to the .devcontainer folder -# but remove the COPY . ${INSTALL_DIR}/ command from it. This avoids -# overwriting /app (which uses symlinks to the workspace) and preserves -# debugging capabilities inside the devcontainer. echo "Generating .devcontainer/Dockerfile" SCRIPT_DIR="$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)" DEVCONTAINER_DIR="${SCRIPT_DIR%/scripts}" @@ -19,7 +15,7 @@ OUT_FILE="${DEVCONTAINER_DIR}/Dockerfile" echo "Adding base Dockerfile from $ROOT_DIR..." -echo "# DO NOT MODIFY THIS FILE DIRECTLY. IT IS AUTO-GENERATED BY .devcontainer/scripts/generate-dockerfile.sh" > "$OUT_FILE" +echo "# DO NOT MODIFY THIS FILE DIRECTLY. IT IS AUTO-GENERATED BY .devcontainer/scripts/generate-configs.sh" > "$OUT_FILE" echo "" >> "$OUT_FILE" echo "# ---/Dockerfile---" >> "$OUT_FILE" diff --git a/install/production-filesystem/services/start-crond.sh b/install/production-filesystem/services/start-crond.sh index 8e6aaaa7..57a99267 100755 --- a/install/production-filesystem/services/start-crond.sh +++ b/install/production-filesystem/services/start-crond.sh @@ -29,6 +29,6 @@ echo "/usr/sbin/crond -c \"${SYSTEM_SERVICES_CROND}\" -f -L \"${LOG_CROND}\" >>\ /usr/sbin/crond -c "${SYSTEM_SERVICES_CROND}" -f -L "${LOG_CROND}" >>"${LOG_CROND}" 2>&1 & crond_pid=$! -wait "${crond_pid}" +wait "${crond_pid}"; status=$? echo -ne " done" -exit $? +exit ${status} diff --git a/install/production-filesystem/services/start-nginx.sh b/install/production-filesystem/services/start-nginx.sh index 8f16813a..df98464e 100755 --- a/install/production-filesystem/services/start-nginx.sh +++ b/install/production-filesystem/services/start-nginx.sh @@ -56,5 +56,6 @@ nginx \ nginx_pid=$! wait "${nginx_pid}" +nginx_exit=$? echo -ne " done" -exit $? +exit ${nginx_exit} diff --git a/install/production-filesystem/services/start-php-fpm.sh b/install/production-filesystem/services/start-php-fpm.sh index 4a4797f7..ec44ce72 100755 --- a/install/production-filesystem/services/start-php-fpm.sh +++ b/install/production-filesystem/services/start-php-fpm.sh @@ -24,8 +24,8 @@ done trap cleanup EXIT trap forward_signal INT TERM -echo "/usr/sbin/php-fpm83 -y \"${PHP_FPM_CONFIG_FILE}\" -F 2>&1 >>\"${LOG_APP_PHP_ERRORS}\" &" -/usr/sbin/php-fpm83 -y "${PHP_FPM_CONFIG_FILE}" -F 2>&1 >>"${LOG_APP_PHP_ERRORS}" & +echo "/usr/sbin/php-fpm83 -y \"${PHP_FPM_CONFIG_FILE}\" -F >>\"${LOG_APP_PHP_ERRORS}\" 2>&1 &" +/usr/sbin/php-fpm83 -y "${PHP_FPM_CONFIG_FILE}" -F >>"${LOG_APP_PHP_ERRORS}" 2>&1 & php_fpm_pid=$! wait "${php_fpm_pid}" diff --git a/requirements.txt b/requirements.txt index 274d642a..70dc2282 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,5 @@ openwrt-luci-rpc asusrouter -asyncio aiohttp graphene flask