1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/rocketchat_ynh.git synced 2024-09-03 20:16:25 +02:00

Improves install script

This commit is contained in:
Selamanse 2017-07-19 11:30:12 +02:00
parent 08df31dcae
commit 4375193790

View file

@ -100,10 +100,10 @@ sudo systemctl start Rocketchat.service
sudo systemctl enable Rocketchat.service
# wait for rocketchat to populate db and start (oneliner has to be improved)
isup=false; x=5; while [ $x -gt 0 ];do echo "Waiting approx. $x seconds..."; \
isup=false; x=45; while [ $x -gt 0 ];do echo "Waiting approx. $x seconds..."; \
x=$(( $x - 1 )); sleep 1; if $(curl -m 1 -s localhost:3000/api/v1/info | \
grep -e "success.*true" >/dev/null 2>%1); then isup=true; break; fi; done && if $isup; \
then echo "service is up"; else echo "service not reachable"; ynh_die; fi
then echo "service is up"; else ynh_die; fi
cd $workdir