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

43 lines
1 KiB
Bash
Raw Normal View History

2020-01-18 10:28:47 +01:00
#!/bin/bash
#=================================================
# COMMON VARIABLES
#=================================================
2021-05-09 15:12:45 +02:00
RUBY_VERSION="2.7.3"
2020-01-18 10:28:47 +01:00
# dependencies used by the app
2020-12-20 00:27:44 +01:00
pkg_dependencies="\
2020-12-27 23:18:55 +01:00
zlib1g-dev \
libsqlite3-dev \
default-libmysqlclient-dev \
libssl-dev \
libreadline-dev \
libjemalloc-dev"
2020-01-18 10:28:47 +01:00
#=================================================
# PERSONAL HELPERS
#=================================================
2021-01-25 13:08:34 +01:00
# 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
}
2020-01-18 10:28:47 +01:00
#================================================
# EXPERIMENTAL HELPERS
#=================================================
2021-01-15 19:58:23 +01:00
2020-01-18 10:28:47 +01:00
#=================================================
# FUTURE OFFICIAL HELPERS
#=================================================