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

13 lines
498 B
Bash
Raw Normal View History

# common.sh
2017-08-18 10:18:31 +02:00
ROCKETCHAT_VERSION=0.58.1
ROCKETCHAT_SHASUM=49650c68339f5e862a8db45eef3ffbeb5da0e425f186ebcefa50f7e89e1a567c
NODE_VERSION=4.7.1
waitforservice() {
isup=false; x=90; while [ $x -gt 0 ];do echo "Waiting approx. $x seconds..."; \
x=$(( $x - 1 )); sleep 1; if $(curl -m 1 -s localhost:$port${path:-/}/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 ynh_die "$app could not be started"; fi
}