git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #71407 from f--t/fix/roundcube

roundcube: fix -- quoting string env variable

commit5f7bcffe219e0433e81dc734254afaf707c4b1a5 authorRobin Gloster <mail@glob.in> dateWed 20 Nov 2019, 09:25 (7 years ago) parent58fb23f4c18309
2 files changed+8−7
nixos/modules/services/mail/roundcube.nix+1−1 nixos/tests/roundcube.nix+7−6
nixos/modules/services/mail/roundcube.nix+1−1
@@ -160,7 +160,7 @@ in
160160 ${pkgs.sudo}/bin/sudo -u ${pgSuperUser} psql postgres -c "create role ${cfg.database.username} with login password '${cfg.database.password}'";
161161 ${pkgs.sudo}/bin/sudo -u ${pgSuperUser} psql postgres -c "create database ${cfg.database.dbname} with owner ${cfg.database.username}";
162162 fi
163− PGPASSWORD=${cfg.database.password} ${pkgs.postgresql}/bin/psql -U ${cfg.database.username} \
163+ PGPASSWORD="${cfg.database.password}" ${pkgs.postgresql}/bin/psql -U ${cfg.database.username} \
164164 -f ${cfg.package}/SQL/postgres.initial.sql \
165165 -h ${cfg.database.host} ${cfg.database.dbname}
166166 touch /var/lib/roundcube/db-created
nixos/tests/roundcube.nix+7−6
@@ -9,7 +9,7 @@ import ./make-test-python.nix ({ pkgs, ...} : {
99 services.roundcube = {
1010 enable = true;
1111 hostName = "roundcube";
12− database.password = "notproduction";
12+ database.password = "not production";
1313 package = pkgs.roundcube.withPlugins (plugins: [ plugins.persistent_login ]);
1414 plugins = [ "persistent_login" ];
1515 };
@@ -21,10 +21,11 @@ import ./make-test-python.nix ({ pkgs, ...} : {
2121 };
2222
2323 testScript = ''
24− roundcube.start
25− roundcube.wait_for_unit("postgresql.service")
26− roundcube.wait_for_unit("phpfpm-roundcube.service")
27− roundcube.wait_for_unit("nginx.service")
28− roundcube.succeed("curl -sSL http://roundcube/ | grep 'Keep me logged in'")
24+ $roundcube->start;
25+ $roundcube->waitForUnit("postgresql.service");
26+ $roundcube->waitForUnit("roundcube-setup.service");
27+ $roundcube->waitForUnit("phpfpm-roundcube.service");
28+ $roundcube->waitForUnit("nginx.service");
29+ $roundcube->succeed("curl -sSfL http://roundcube/ | grep 'Keep me logged in'");
2930 '';
3031})