1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/snserver_ynh.git synced 2024-09-03 20:26:22 +02:00
snserver_ynh/scripts/_common.sh
2021-05-02 11:57:39 +02:00

42 lines
1 KiB
Bash

#!/bin/bash
#=================================================
# COMMON VARIABLES
#=================================================
RUBY_VERSION="2.7.2"
# dependencies used by the app
pkg_dependencies="\
zlib1g-dev \
libsqlite3-dev \
default-libmysqlclient-dev \
libssl-dev \
libreadline-dev \
libjemalloc-dev"
#=================================================
# PERSONAL HELPERS
#=================================================
# Check if service is ready
is_service_ready() {
for ((i = 0 ; i < 15 ; i++))
do
if [ "200" -eq $(curl --silent --insecure --resolve $domain:443:127.0.0.1 https://$domain$path_url/ -o /dev/null --write-out "%{http_code}") ]
then
break
else
sleep 2
fi
done
}
#================================================
# EXPERIMENTAL HELPERS
#=================================================
#=================================================
# FUTURE OFFICIAL HELPERS
#=================================================