* Option `services.apache.phpIni' (which is of type derivation)

replaced by `services.apache.phpOptions' (of type string).
* Allow Apache subservices to add to phpOptions.
* Set the TZ environment variable in Apache.
* Updated the Zabbix web interface.

svn path=/nixos/trunk/; revision=20023
This commit is contained in:
Eelco Dolstra
2010-02-15 19:02:42 +00:00
parent 014ffaac5d
commit 83b76bc2cf
3 changed files with 58 additions and 67 deletions

View File

@@ -45,6 +45,8 @@ in
config = mkIf config.services.zabbixServer.enable {
services.postgresql.enable = true;
users.extraUsers = singleton
{ name = "zabbix";
uid = config.ids.uids.zabbix;
@@ -52,7 +54,7 @@ in
};
jobs.zabbix_server =
{ #name = "zabbix-server"; !!! mkIf bug
{ name = "zabbix-server";
description = "Zabbix server daemon";
@@ -67,18 +69,21 @@ in
if ! test -e "${libDir}/db-created"; then
${pkgs.postgresql}/bin/createuser --no-superuser --no-createdb --no-createrole zabbix || true
${pkgs.postgresql}/bin/createdb --owner zabbix zabbix || true
cat ${pkgs.zabbixServer}/share/zabbix/db/schema/postgresql.sql | ${pkgs.su}/bin/su -s "$SHELL" zabbix -c 'psql zabbix'
cat ${pkgs.zabbixServer}/share/zabbix/db/data/data.sql | ${pkgs.su}/bin/su -s "$SHELL" zabbix -c 'psql zabbix'
cat ${pkgs.zabbixServer}/share/zabbix/db/data/images_pgsql.sql | ${pkgs.su}/bin/su -s "$SHELL" zabbix -c 'psql zabbix'
cat ${pkgs.zabbix.server}/share/zabbix/db/schema/postgresql.sql | ${pkgs.su}/bin/su -s "$SHELL" zabbix -c '${pkgs.postgresql}/bin/psql zabbix'
cat ${pkgs.zabbix.server}/share/zabbix/db/data/data.sql | ${pkgs.su}/bin/su -s "$SHELL" zabbix -c '${pkgs.postgresql}/bin/psql zabbix'
cat ${pkgs.zabbix.server}/share/zabbix/db/data/images_pgsql.sql | ${pkgs.su}/bin/su -s "$SHELL" zabbix -c '${pkgs.postgresql}/bin/psql zabbix'
touch "${libDir}/db-created"
fi
export PATH=${pkgs.nettools}/bin:$PATH
${pkgs.zabbixServer}/sbin/zabbix_server --config ${configFile}
${pkgs.zabbix.server}/sbin/zabbix_server --config ${configFile}
'';
postStop =
''
pid=$(cat ${pidFile})
test -n "$pid" && kill "$pid"
# Wait until they're really gone.
while ${pkgs.procps}/bin/pkill -u zabbix zabbix_server; do true; done
'';
};