3
0
Fork 0
forked from mirrors/nixpkgs

nixos/influxdb: wait for start

This commit is contained in:
Jaka Hudoklin 2014-09-13 02:19:39 +02:00
parent 26fd945151
commit 74122464da

View file

@ -224,6 +224,11 @@ in
mkdir -m 0770 -p ${cfg.dataDir} mkdir -m 0770 -p ${cfg.dataDir}
if [ "$(id -u)" = 0 ]; then chown -R ${cfg.user}:${cfg.group} ${cfg.dataDir}; fi if [ "$(id -u)" = 0 ]; then chown -R ${cfg.user}:${cfg.group} ${cfg.dataDir}; fi
''; '';
postStart = mkBefore ''
until ${pkgs.curl}/bin/curl -s -o /dev/null 'http://${cfg.bindAddress}:${toString cfg.apiPort}/'; do
sleep 1;
done
'';
}; };
users.extraUsers = optional (cfg.user == "influxdb") { users.extraUsers = optional (cfg.user == "influxdb") {