[PHP-FPM, Config] API key generated via mailcow.conf as rw access

This commit is contained in:
andryyy
2020-04-10 21:21:11 +02:00
parent 08d2bdd6c7
commit 730fa16a69
3 changed files with 3 additions and 2 deletions

View File

@@ -132,7 +132,7 @@ if [[ ${API_ALLOW_FROM} != "invalid" ]] && \
if [[ ! -z ${VALIDATED_IPS} ]]; then
mysql --socket=/var/run/mysqld/mysqld.sock -u ${DBUSER} -p${DBPASS} ${DBNAME} << EOF
DELETE FROM api;
INSERT INTO api (api_key, active, allow_from) VALUES ("${API_KEY}", "1", "${VALIDATED_IPS}");
INSERT INTO api (api_key, active, allow_from, access) VALUES ("${API_KEY}", "1", "${VALIDATED_IPS}", "rw");
EOF
fi
fi