set default user role per env

This commit is contained in:
Moritz
2023-06-08 16:00:19 +02:00
parent 55f00a482a
commit 8cc028fc00
2 changed files with 15 additions and 1 deletions
+7 -1
View File
@@ -9,7 +9,7 @@ wp() {
core_install(){
ADMIN=admin
if [ -n $AUTHENTIK_DOMAIN ]
if [ -n "$AUTHENTIK_DOMAIN" ]
then
ADMIN=akadmin
fi
@@ -20,6 +20,12 @@ core_install(){
wp "rewrite structure '/%year%/%monthnum%/%day%/%postname%/'"
wp "plugin install --activate disable-update-notifications"
wp 'option update dwcun_setting on'
if [ -n "$DEFAULT_USER_ROLE" ]
then
wp "option set default_role $DEFAULT_USER_ROLE"
else
wp "option set default_role subscriber"
fi
wp 'plugin auto-updates enable --all'
}