1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/opensondage_ynh.git synced 2024-09-03 19:46:28 +02:00

Improve file and url access

This commit is contained in:
Jean-Baptiste Holcroft 2017-10-27 22:48:00 +02:00
parent 4dba70af6a
commit db5c5a0cc1
3 changed files with 29 additions and 21 deletions

View file

@ -145,31 +145,35 @@ touch "$final_path/admin/stdout.log"
#=================================================
# GENERIC FINALIZATION
#=================================================
# SECURE FILES AND DIRECTORIES
#=================================================
# Set permissions
chown -R "$app": "$final_path"
#=================================================
# Run database initilization
#=================================================
# Set initial permissions of initilization
chown -R "$app": "$final_path"
init_composer "$app" "$final_path"
sudo -u "$app" php "$final_path/admin/migration.php"
#=================================================
# SECURE FILES AND DIRECTORIES
#=================================================
chown -R root: "$final_path"
chown -R "$app": "$final_path/tpl_c"
#=================================================
# SETUP SSOWAT
#=================================================
ynh_app_setting_set "$app" skipped_uris "/"
if [[ $is_public -eq 0 ]];
if [ $is_public -eq 0 ];
then
ynh_app_setting_set "$app" protected_uris "/admin,/index.php,/choix_date.php,/choix_autre.php,/infos_sondage.php,/scripts"
ynh_app_setting_set "$app" protected_uris "/"
else
ynh_app_setting_set "$app" protected_uris "/admin/index.php,/admin/stdout.log,/scripts"
ynh_app_setting_set "$app" protected_uris "/admin"
ynh_replace_string " include conf.d/" " #include conf.d/" "$finalnginxconf"
ynh_store_file_checksum "$finalnginxconf"

View file

@ -72,7 +72,7 @@ ynh_system_user_create "$app"
#=================================================
# Set permissions
chown -R "$app": "$final_path"
chown -R "$app": "$final_path/tpl_c"
#=================================================
# RESTORE THE PHP-FPM CONFIGURATION

View file

@ -131,6 +131,7 @@ ynh_add_fpm_config
#=================================================
# STORE THE CHECKSUM OF THE CONFIG FILE
#=================================================
config="$final_path/app/inc/config.php"
# Verify the checksum and backup the file if it's different
ynh_backup_if_checksum_is_different "$config"
@ -138,7 +139,6 @@ ynh_backup_if_checksum_is_different "$config"
# Create config.php
#=================================================
config="$final_path/app/inc/config.php"
cp ../conf/config.php "$config"
# Change variables in configuration
@ -172,31 +172,35 @@ touch "$final_path/admin/stdout.log"
#=================================================
# GENERIC FINALIZATION
#=================================================
# SECURE FILES AND DIRECTORIES
#=================================================
# Set permissions to roundcube directory
chown -R "$app": "$final_path"
#=================================================
# Run database initilization
#=================================================
# Set initial permissions for initilization
chown -R "$app": "$final_path"
init_composer "$app" "$final_path"
sudo -u "$app" php "$final_path/admin/migration.php"
#=================================================
# SECURE FILES AND DIRECTORIES
#=================================================
chown -R root: "$final_path"
chown -R "$app": "$final_path/tpl_c"
#=================================================
# SETUP SSOWAT
#=================================================
ynh_app_setting_set "$app" skipped_uris "/"
if [ $is_public -eq 0 ];
then
ynh_app_setting_set "$app" protected_uris "/admin,/index.php,/choix_date.php,/choix_autre.php,/infos_sondage.php,/scripts"
ynh_app_setting_set "$app" protected_uris "/"
else
ynh_app_setting_set "$app" protected_uris "/admin/index.php,/admin/stdout.log,/scripts"
ynh_app_setting_set "$app" protected_uris "/admin"
ynh_replace_string " include conf.d/" " #include conf.d/" "$finalnginxconf"
ynh_store_file_checksum "$finalnginxconf"