Merge pull request #284122 from Stunkymonkey/zabbix-write-secret

nixos/{zabbixServer,zabbixProxy}: prefer 'install' over 'mkdir/chmod/chown'
This commit is contained in:
Aaron Andersen 2024-01-28 06:24:11 -08:00 committed by GitHub
commit 0ed21f3b09
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 8 deletions

View File

@ -299,10 +299,7 @@ in
fi
'' + optionalString (cfg.database.passwordFile != null) ''
# create a copy of the supplied password file in a format zabbix can consume
touch ${passwordFile}
chmod 0600 ${passwordFile}
echo -n "DBPassword = " > ${passwordFile}
cat ${cfg.database.passwordFile} >> ${passwordFile}
install -m 0600 <(echo "DBPassword = $(cat ${cfg.database.passwordFile})") ${passwordFile}
'';
serviceConfig = {

View File

@ -292,10 +292,7 @@ in
fi
'' + optionalString (cfg.database.passwordFile != null) ''
# create a copy of the supplied password file in a format zabbix can consume
touch ${passwordFile}
chmod 0600 ${passwordFile}
echo -n "DBPassword = " > ${passwordFile}
cat ${cfg.database.passwordFile} >> ${passwordFile}
install -m 0600 <(echo "DBPassword = $(cat ${cfg.database.passwordFile})") ${passwordFile}
'';
serviceConfig = {