mirror of
https://github.com/YunoHost-Apps/z-push_ynh.git
synced 2024-09-03 18:05:58 +02:00
fix public
This commit is contained in:
parent
b5f1e06f35
commit
8368d2b293
2 changed files with 6 additions and 33 deletions
|
@ -28,7 +28,6 @@ ynh_abort_if_errors
|
||||||
|
|
||||||
domain=$YNH_APP_ARG_DOMAIN
|
domain=$YNH_APP_ARG_DOMAIN
|
||||||
path_url="/"
|
path_url="/"
|
||||||
is_public="1"
|
|
||||||
|
|
||||||
path_url_activesync="/Microsoft-Server-ActiveSync"
|
path_url_activesync="/Microsoft-Server-ActiveSync"
|
||||||
path_url_autodiscover1="/AutoDiscover"
|
path_url_autodiscover1="/AutoDiscover"
|
||||||
|
@ -63,7 +62,6 @@ ynh_print_info "Storing installation settings..."
|
||||||
|
|
||||||
ynh_app_setting_set $app domain $domain
|
ynh_app_setting_set $app domain $domain
|
||||||
ynh_app_setting_set $app path $path_url
|
ynh_app_setting_set $app path $path_url
|
||||||
ynh_app_setting_set $app is_public $is_public
|
|
||||||
ynh_app_setting_set $app final_path $final_path
|
ynh_app_setting_set $app final_path $final_path
|
||||||
ynh_app_setting_set $app config_path $config_path
|
ynh_app_setting_set $app config_path $config_path
|
||||||
ynh_app_setting_set $app state_path $state_path
|
ynh_app_setting_set $app state_path $state_path
|
||||||
|
@ -76,7 +74,7 @@ ynh_app_setting_set $app log_path $log_path
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_print_info "Installing dependencies..."
|
ynh_print_info "Installing dependencies..."
|
||||||
|
|
||||||
ynh_install_extra_repo --repo="deb http://repo.z-hub.io/z-push:/final/Debian_9.0/ /" --key="http://repo.z-hub.io/z-push:/final/Debian_9.0/Release.key"
|
ynh_install_extra_repo --repo="deb http://repo.z-hub.io/z-push:/final/Debian_9.0/ " --key="http://repo.z-hub.io/z-push:/final/Debian_9.0/Release.key"
|
||||||
|
|
||||||
ynh_install_app_dependencies $pkg_dependencies
|
ynh_install_app_dependencies $pkg_dependencies
|
||||||
|
|
||||||
|
@ -213,12 +211,8 @@ ynh_use_logrotate
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_print_info "Configuring SSOwat..."
|
ynh_print_info "Configuring SSOwat..."
|
||||||
|
|
||||||
# Make app public if necessary
|
# Make app public
|
||||||
if [ $is_public -eq 1 ]
|
|
||||||
then
|
|
||||||
# unprotected_uris allows SSO credentials to be passed anyway.
|
|
||||||
ynh_app_setting_set $app unprotected_uris "/"
|
ynh_app_setting_set $app unprotected_uris "/"
|
||||||
fi
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RELOAD NGINX
|
# RELOAD NGINX
|
||||||
|
|
|
@ -19,7 +19,6 @@ app=$YNH_APP_INSTANCE_NAME
|
||||||
|
|
||||||
domain=$(ynh_app_setting_get $app domain)
|
domain=$(ynh_app_setting_get $app domain)
|
||||||
path_url=$(ynh_app_setting_get $app path)
|
path_url=$(ynh_app_setting_get $app path)
|
||||||
is_public=$(ynh_app_setting_get $is_public)
|
|
||||||
final_path=$(ynh_app_setting_get $app final_path)
|
final_path=$(ynh_app_setting_get $app final_path)
|
||||||
config_path=$(ynh_app_setting_get $app config_path)
|
config_path=$(ynh_app_setting_get $app config_path)
|
||||||
state_path=$(ynh_app_setting_get $app state_path)
|
state_path=$(ynh_app_setting_get $app state_path)
|
||||||
|
@ -30,28 +29,12 @@ log_path=$(ynh_app_setting_get $app log_path)
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_print_info "Ensuring downward compatibility..."
|
ynh_print_info "Ensuring downward compatibility..."
|
||||||
|
|
||||||
# Fix is_public as a boolean value
|
|
||||||
if [ "$is_public" = "Yes" ]; then
|
|
||||||
ynh_app_setting_set $app is_public 1
|
|
||||||
is_public=1
|
|
||||||
elif [ "$is_public" = "No" ]; then
|
|
||||||
ynh_app_setting_set $app is_public 0
|
|
||||||
is_public=0
|
|
||||||
fi
|
|
||||||
|
|
||||||
# If db_name doesn't exist, create it
|
|
||||||
if [ -z $db_name ]; then
|
|
||||||
db_name=$(ynh_sanitize_dbid $app)
|
|
||||||
ynh_app_setting_set $app db_name $db_name
|
|
||||||
fi
|
|
||||||
|
|
||||||
# If final_path doesn't exist, create it
|
# If final_path doesn't exist, create it
|
||||||
if [ -z $final_path ]; then
|
if [ -z $final_path ]; then
|
||||||
final_path=/var/www/$app
|
final_path=/usr/share/z-push
|
||||||
ynh_app_setting_set $app final_path $final_path
|
ynh_app_setting_set $app final_path $final_path
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
config_path=/etc/z-push
|
config_path=/etc/z-push
|
||||||
state_path=/var/lib/z-push
|
state_path=/var/lib/z-push
|
||||||
log_path=/var/log/z-push
|
log_path=/var/log/z-push
|
||||||
|
@ -232,12 +215,8 @@ chown -R www-data:www-data $state_path
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_print_info "Upgrading SSOwat configuration..."
|
ynh_print_info "Upgrading SSOwat configuration..."
|
||||||
|
|
||||||
# Make app public if necessary
|
# Make app public
|
||||||
if [ $is_public -eq 1 ]
|
|
||||||
then
|
|
||||||
# unprotected_uris allows SSO credentials to be passed anyway
|
|
||||||
ynh_app_setting_set $app unprotected_uris "/"
|
ynh_app_setting_set $app unprotected_uris "/"
|
||||||
fi
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RELOAD NGINX
|
# RELOAD NGINX
|
||||||
|
|
Loading…
Add table
Reference in a new issue