From 36c49f0083cf44527c4f532640a5c76f55bd5a3e Mon Sep 17 00:00:00 2001 From: Gagan Deep Date: Tue, 21 Jun 2022 17:52:33 +0530 Subject: [PATCH] [requested-changes] Added ping in celery container --- images/common/init_command.sh | 2 +- images/openwisp_celery/Dockerfile | 2 +- images/openwisp_wireguard/Dockerfile | 3 ++- images/openwisp_wireguard/update_wireguard.sh | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/images/common/init_command.sh b/images/common/init_command.sh index e7b2efd4..d180bfac 100644 --- a/images/common/init_command.sh +++ b/images/common/init_command.sh @@ -51,7 +51,7 @@ elif [ "$MODULE_NAME" = 'wireguard' ]; then exit fi wait_nginx_services - sudo -u openwisp -E bash -c "source utils.sh; wireguard_setup" + wireguard_setup elif [ "$MODULE_NAME" = 'wireguard_updater' ]; then start_uwsgi diff --git a/images/openwisp_celery/Dockerfile b/images/openwisp_celery/Dockerfile index 12a96139..77199c03 100644 --- a/images/openwisp_celery/Dockerfile +++ b/images/openwisp_celery/Dockerfile @@ -14,7 +14,7 @@ COPY --chown=openwisp:root ./openwisp_dashboard/module_settings.py \ USER root:root RUN apt install --yes --no-install-recommends \ - iproute2 iptables sudo + iproute2 iptables sudo iputils-ping RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers CMD ["bash", "init_command.sh"] diff --git a/images/openwisp_wireguard/Dockerfile b/images/openwisp_wireguard/Dockerfile index 60084253..76d63058 100644 --- a/images/openwisp_wireguard/Dockerfile +++ b/images/openwisp_wireguard/Dockerfile @@ -20,7 +20,8 @@ COPY --chown=openwisp:root ./openwisp_wireguard/update_wireguard.sh \ ./common/utils.sh \ ./common/services.py /opt/openwisp/ -CMD ["bash", "init_command.sh"] +USER openwisp:root +ENTRYPOINT ["bash", "init_command.sh"] EXPOSE 51820 diff --git a/images/openwisp_wireguard/update_wireguard.sh b/images/openwisp_wireguard/update_wireguard.sh index 836d6785..463707aa 100644 --- a/images/openwisp_wireguard/update_wireguard.sh +++ b/images/openwisp_wireguard/update_wireguard.sh @@ -121,7 +121,7 @@ watch_configuration_change() { _REDIS_CMD="$_REDIS_CMD -p $REDIS_PORT" fi if [[ "$REDIS_PASS" ]]; then - _REDIS_CMD="$_REDIS_CMD -a $REDIS_PASS" + _REDIS_CMD="$_REDIS_CMD -a $REDIS_PASS --no-auth-warning" fi while true; do if [ -f "$_TIMESTAMP_FILE" ]; then