add option for ticket api user
All checks were successful
build container icinga2 / build (push) Successful in 2m42s

This commit is contained in:
2025-02-02 20:18:03 +01:00
parent 962dbfac9c
commit 04ff12a14f
2 changed files with 23 additions and 1 deletions

View File

@@ -32,6 +32,14 @@ if [ ! -f "$ICINGA2_FILE_API_CONF" ]; then
echo ' permissions = [ "status/query", "actions/*", "objects/modify/*", "objects/query/*" ]' >> $ICINGA2_FILE_API_USER_CONF
echo '}' >> $ICINGA2_FILE_API_USER_CONF
fi
if [ ! -z "$ICINGA2_API_USER_SATELLITE_PASS" ]; then
echo set inital icingadb api user
echo 'object ApiUser "pki-ticket" {' >> $ICINGA2_FILE_API_USER_CONF
echo " password = \"$ICINGA2_API_USER_SATELLITE_PASS\"" >> $ICINGA2_FILE_API_USER_CONF
echo ' permissions = [ "actions/generate-ticket" ]' >> $ICINGA2_FILE_API_USER_CONF
echo '}' >> $ICINGA2_FILE_API_USER_CONF
fi
fi
## enable icingadb feature if not active