2018-04-29 13:00:03 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
2018-05-01 22:36:16 +02:00
|
|
|
#=================================================
|
2019-06-14 18:57:58 +02:00
|
|
|
# COMMON VARIABLES
|
2018-05-01 22:36:16 +02:00
|
|
|
#=================================================
|
|
|
|
|
2019-06-14 18:57:58 +02:00
|
|
|
# dependencies used by the app
|
2019-06-19 02:18:00 +02:00
|
|
|
pkg_dependencies="postgresql curl libzip-dev"
|
2020-04-01 03:46:31 +02:00
|
|
|
extra_pkg_dependencies="php7.3-fpm php7.3-cli php7.3-gd php7.3-mysql php7.3-xml php7.3-ldap php7.3-mbstring php7.3-pgsql"
|
2018-05-01 22:36:16 +02:00
|
|
|
|
2019-06-14 18:57:58 +02:00
|
|
|
#=================================================
|
|
|
|
# PERSONAL HELPERS
|
|
|
|
#=================================================
|
2018-05-01 22:36:16 +02:00
|
|
|
|
2019-06-14 18:57:58 +02:00
|
|
|
#=================================================
|
|
|
|
# EXPERIMENTAL HELPERS
|
|
|
|
#=================================================
|
2018-05-01 22:36:16 +02:00
|
|
|
|
2019-06-14 18:57:58 +02:00
|
|
|
ynh_export () {
|
|
|
|
local ynh_arg=""
|
|
|
|
for var in $@;
|
|
|
|
do
|
|
|
|
ynh_arg=$(echo $var | awk '{print toupper($0)}')
|
|
|
|
if [ "$var" == "path_url" ]; then
|
|
|
|
ynh_arg="PATH"
|
|
|
|
fi
|
|
|
|
ynh_arg="YNH_APP_ARG_$ynh_arg"
|
|
|
|
export $var=${!ynh_arg}
|
|
|
|
done
|
|
|
|
}
|
|
|
|
|
|
|
|
# Save listed var in YunoHost app settings
|
|
|
|
# usage: ynh_save_args VARNAME1 [VARNAME2 [...]]
|
|
|
|
ynh_save_args () {
|
|
|
|
local var
|
|
|
|
for var in $@;
|
|
|
|
do
|
|
|
|
local setting_var="$var"
|
|
|
|
if [ "$var" == "path_url" ]; then
|
|
|
|
setting_var="path"
|
|
|
|
fi
|
|
|
|
ynh_app_setting_set --app=$app --key=$setting_var --value="${!var}"
|
|
|
|
done
|
2018-05-01 22:36:16 +02:00
|
|
|
}
|
|
|
|
|