0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-13 21:50:33 +03:00

match systemd style and silent curl progress bar during startup check

This commit is contained in:
Corey O'Connor 2014-02-25 15:44:07 -08:00
parent 9b79d5b298
commit 292ece425e

View file

@ -61,7 +61,7 @@ in {
users.jenkins.enable = true; users.jenkins.enable = true;
systemd.services.jenkins = { systemd.services.jenkins = {
description = "jenkins continuous integration server"; description = "Jenkins Continuous Integration Server";
after = [ "network.target" ]; after = [ "network.target" ];
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
@ -76,11 +76,11 @@ in {
''; '';
postStart = '' postStart = ''
until ${pkgs.curl}/bin/curl -L localhost:${toString cfg.port} ; do until ${pkgs.curl}/bin/curl -s -L localhost:${toString cfg.port} ; do
sleep 10 sleep 10
done done
while true ; do while true ; do
index=`${pkgs.curl}/bin/curl -L localhost:${toString cfg.port}` index=`${pkgs.curl}/bin/curl -s -L localhost:${toString cfg.port}`
if [[ !("$index" =~ 'Please wait while Jenkins is restarting' || if [[ !("$index" =~ 'Please wait while Jenkins is restarting' ||
"$index" =~ 'Please wait while Jenkins is getting ready to work') ]]; then "$index" =~ 'Please wait while Jenkins is getting ready to work') ]]; then
exit 0 exit 0