mirror of
https://github.com/YunoHost-Apps/rocketchat_ynh.git
synced 2024-09-03 20:16:25 +02:00
Fixes typo and struct in _common.sh
This commit is contained in:
parent
9c25bc0ca3
commit
740990111e
1 changed files with 21 additions and 4 deletions
|
@ -4,11 +4,28 @@ ROCKETCHAT_VERSION=0.58.4
|
|||
ROCKETCHAT_SHASUM=ed53712b37571b959b5c8c8947d6335c21fced316f2b3174bfe027fa25700c44
|
||||
NODE_VERSION=4.7.1
|
||||
|
||||
checkcmd() {
|
||||
curl -m 1 -s localhost:$port$path/api/v1/info | grep -e \"success.*true\" >/dev/null 2>&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
|
||||
isup=false
|
||||
x=90
|
||||
while [ $x -gt 0 ]; do
|
||||
echo "Waiting approx. $x seconds..."
|
||||
x=$(( $x - 1 ))
|
||||
sleep 1
|
||||
|
||||
if checkcmd; then
|
||||
isup=true; break;
|
||||
fi;
|
||||
done
|
||||
|
||||
if $isup; then
|
||||
echo "service is up"
|
||||
else
|
||||
ynh_die "$app could not be started"
|
||||
fi
|
||||
}
|
||||
|
||||
installdeps(){
|
||||
|
|
Loading…
Add table
Reference in a new issue