123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133 |
- #!/bin/bash
- source _common.sh
- source /usr/share/yunohost/helpers
- app=$YNH_APP_INSTANCE_NAME
- domain=$(ynh_app_setting_get $app domain)
- path_url=$(ynh_app_setting_get $app path)
- admin=$(ynh_app_setting_get $app admin)
- is_public=$(ynh_app_setting_get $app is_public)
- final_path=$(ynh_app_setting_get $app final_path)
- port=$(ynh_app_setting_get $app port)
- db_name=$(ynh_app_setting_get $app db_name)
- 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 [ -z $db_name ]; then
- db_name=$(ynh_sanitize_dbid $app)
- ynh_app_setting_set $app db_name $db_name
- fi
- path_url=$(ynh_normalize_url_path $path_url)
- ynh_setup_source "$final_path"
- ynh_nginx_config
- ynh_system_user_create $app
- ynh_fpm_config
- ynh_backup_if_checksum_is_different "$final_path/CONFIG_FILE"
- ynh_store_file_checksum "$final_path/CONFIG_FILE"
- ynh_use_logrotate
- ynh_systemd_config
- chown -R root: $final_path
- if [ $is_public -eq 0 ]
- then
- ynh_app_setting_delete $app skipped_uris
- fi
- if [ $is_public -eq 1 ]
- then
-
- ynh_app_setting_set $app unprotected_uris "/"
- fi
- systemctl reload nginx
|