File tree Expand file tree Collapse file tree 5 files changed +9
-4
lines changed Expand file tree Collapse file tree 5 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ elif [ "$MODULE_NAME" = 'wireguard' ]; then
5151 exit
5252 fi
5353 wait_nginx_services
54- sudo -u openwisp -E bash -c " source utils.sh; wireguard_setup"
54+ wireguard_setup
5555
5656elif [ " $MODULE_NAME " = ' wireguard_updater' ]; then
5757 start_uwsgi
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ COPY --chown=openwisp:root ./openwisp_dashboard/module_settings.py \
1414
1515USER root:root
1616RUN apt install --yes --no-install-recommends \
17- iproute2 iptables sudo
17+ iproute2 iptables sudo iputils-ping
1818RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
1919
2020CMD ["bash" , "init_command.sh" ]
Original file line number Diff line number Diff line change @@ -20,7 +20,8 @@ COPY --chown=openwisp:root ./openwisp_wireguard/update_wireguard.sh \
2020 ./common/utils.sh \
2121 ./common/services.py /opt/openwisp/
2222
23- CMD ["bash" , "init_command.sh" ]
23+ USER openwisp:root
24+ ENTRYPOINT ["bash" , "init_command.sh" ]
2425
2526EXPOSE 51820
2627
Original file line number Diff line number Diff line change @@ -121,7 +121,7 @@ watch_configuration_change() {
121121 _REDIS_CMD=" $_REDIS_CMD -p $REDIS_PORT "
122122 fi
123123 if [[ " $REDIS_PASS " ]]; then
124- _REDIS_CMD=" $_REDIS_CMD -a $REDIS_PASS "
124+ _REDIS_CMD=" $_REDIS_CMD -a $REDIS_PASS --no-auth-warning "
125125 fi
126126 while true ; do
127127 if [ -f " $_TIMESTAMP_FILE " ]; then
Original file line number Diff line number Diff line change 11import os
2+ import re
23import subprocess
34import time
45import unittest
@@ -449,6 +450,9 @@ def test_containers_down(self):
449450 cwd = self .root_location ,
450451 )
451452 output , error = map (str , cmd .communicate ())
453+ # Remove wireguard container from output because it exits when it fails
454+ # to download configuration from the dashboard
455+ output = re .sub ('docker-openwisp_wireguard_1(.*)Exit(.*)\\ n' , '' , output )
452456 if 'Exit' in output :
453457 self .fail (
454458 f'One of the containers are down!\n Output:\n { output } \n Error:\n { error } '
You can’t perform that action at this time.
0 commit comments