move root api pw set before other users
All checks were successful
build container icinga2 / build (push) Successful in 2m12s
All checks were successful
build container icinga2 / build (push) Successful in 2m12s
This commit is contained in:
11
init.sh
11
init.sh
@@ -23,6 +23,12 @@ if [ -z "$(ls -A /data)" ]; then
|
||||
mv $ICINGA2_CONF_DIR/*.conf $ICINGA2_GLOBAL_TEMPLATES/
|
||||
mv $ICINGA2_GLOBAL_TEMPLATES/api-users.conf $ICINGA2_CONF_DIR/
|
||||
|
||||
## only on inital setup replace one time the api root user password if a env var is set
|
||||
if [ ! -z "$ICINGA2_API_USER_ROOT_PASS" ]; then
|
||||
echo set inital api root user password
|
||||
sed -i "s|password = \".*\"|password = \"$ICINGA2_API_USER_ROOT_PASS\"|g" $ICINGA2_FILE_API_USER_CONF
|
||||
fi
|
||||
|
||||
## only on inital setup create a icingaweb api user if env var is set
|
||||
## permission source: https://icinga.com/docs/icinga-web/latest/modules/monitoring/doc/05-Command-Transports/
|
||||
if [ ! -z "$ICINGA2_API_USER_ICINGAWEB_PASS" ]; then
|
||||
@@ -44,11 +50,6 @@ if [ -z "$(ls -A /data)" ]; then
|
||||
|
||||
fi
|
||||
|
||||
## only on inital setup replace one time the api root user password if a env var is set
|
||||
if [ ! -z "$ICINGA2_API_USER_ROOT_PASS" ]; then
|
||||
echo set inital api root user password
|
||||
sed -i "s|password = \".*\"|password = \"$ICINGA2_API_USER_ROOT_PASS\"|g" $ICINGA2_FILE_API_USER_CONF
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user