Skip to content

Commit 8c36a0d

Browse files
committed
[fix] Fixed REDIS_PASS environment variable
1 parent 95a6933 commit 8c36a0d

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

images/openwisp_wireguard/update_wireguard.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,8 @@ watch_configuration_change() {
123123
if [[ "$REDIS_PORT" ]]; then
124124
_REDIS_CMD="$_REDIS_CMD -p $REDIS_PORT"
125125
fi
126-
if [[ "$REDIS_PASSWORD" ]]; then
127-
_REDIS_CMD="$_REDIS_CMD -a $REDIS_PASSWORD"
126+
if [[ "$REDIS_PASS" ]]; then
127+
_REDIS_CMD="$_REDIS_CMD -a $REDIS_PASS"
128128
fi
129129
while true; do
130130
if [ -f "$_TIMESTAMP_FILE" ]; then

images/openwisp_wireguard_updater/vpn_updater.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@
99
KEY = os.environ.get('WIREGUARD_UPDATER_KEY')
1010
REDIS_HOST = os.environ.get('REDIS_HOST')
1111
REDIS_PORT = os.environ.get('REDIS_PORT')
12-
REDIS_PASSWORD = os.environ.get('REDIS_PASSWORD')
12+
REDIS_PASS = os.environ.get('REDIS_PASS')
1313
REDIS_DATABASE = os.environ.get('REDIS_DB', 15)
1414

1515

1616
def _trigger_configuration_update(vpn_id):
1717
redis_kwargs = {}
18-
if REDIS_PASSWORD:
19-
redis_kwargs['password'] = REDIS_PASSWORD
18+
if REDIS_PASS:
19+
redis_kwargs['password'] = REDIS_PASS
2020
if REDIS_PORT:
2121
redis_kwargs['port'] = REDIS_PORT
2222
unix_timestamp = int(datetime.now().timestamp())

0 commit comments

Comments
 (0)