nixos/{zabbixServer,zabbixProxy}: prefer 'install' over 'mkdir/chmod/chown'
This commit is contained in:
@@ -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 = {
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user