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:
parent
4dba70af6a
commit
db5c5a0cc1
3 changed files with 29 additions and 21 deletions
|
@ -145,31 +145,35 @@ touch "$final_path/admin/stdout.log"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# GENERIC FINALIZATION
|
# GENERIC FINALIZATION
|
||||||
#=================================================
|
|
||||||
# SECURE FILES AND DIRECTORIES
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
# Set permissions
|
|
||||||
chown -R "$app": "$final_path"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# Run database initilization
|
# Run database initilization
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
|
# Set initial permissions of initilization
|
||||||
|
chown -R "$app": "$final_path"
|
||||||
|
|
||||||
init_composer "$app" "$final_path"
|
init_composer "$app" "$final_path"
|
||||||
|
|
||||||
sudo -u "$app" php "$final_path/admin/migration.php"
|
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
|
# SETUP SSOWAT
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
ynh_app_setting_set "$app" skipped_uris "/"
|
ynh_app_setting_set "$app" skipped_uris "/"
|
||||||
if [[ $is_public -eq 0 ]];
|
|
||||||
|
if [ $is_public -eq 0 ];
|
||||||
then
|
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
|
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_replace_string " include conf.d/" " #include conf.d/" "$finalnginxconf"
|
||||||
|
|
||||||
ynh_store_file_checksum "$finalnginxconf"
|
ynh_store_file_checksum "$finalnginxconf"
|
||||||
|
|
|
@ -72,7 +72,7 @@ ynh_system_user_create "$app"
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# Set permissions
|
# Set permissions
|
||||||
chown -R "$app": "$final_path"
|
chown -R "$app": "$final_path/tpl_c"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE THE PHP-FPM CONFIGURATION
|
# RESTORE THE PHP-FPM CONFIGURATION
|
||||||
|
|
|
@ -131,6 +131,7 @@ ynh_add_fpm_config
|
||||||
#=================================================
|
#=================================================
|
||||||
# STORE THE CHECKSUM OF THE CONFIG FILE
|
# 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
|
# Verify the checksum and backup the file if it's different
|
||||||
ynh_backup_if_checksum_is_different "$config"
|
ynh_backup_if_checksum_is_different "$config"
|
||||||
|
|
||||||
|
@ -138,7 +139,6 @@ ynh_backup_if_checksum_is_different "$config"
|
||||||
# Create config.php
|
# Create config.php
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
config="$final_path/app/inc/config.php"
|
|
||||||
cp ../conf/config.php "$config"
|
cp ../conf/config.php "$config"
|
||||||
|
|
||||||
# Change variables in configuration
|
# Change variables in configuration
|
||||||
|
@ -172,31 +172,35 @@ touch "$final_path/admin/stdout.log"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# GENERIC FINALIZATION
|
# GENERIC FINALIZATION
|
||||||
#=================================================
|
|
||||||
# SECURE FILES AND DIRECTORIES
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
# Set permissions to roundcube directory
|
|
||||||
chown -R "$app": "$final_path"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# Run database initilization
|
# Run database initilization
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
|
# Set initial permissions for initilization
|
||||||
|
chown -R "$app": "$final_path"
|
||||||
|
|
||||||
init_composer "$app" "$final_path"
|
init_composer "$app" "$final_path"
|
||||||
|
|
||||||
sudo -u "$app" php "$final_path/admin/migration.php"
|
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
|
# SETUP SSOWAT
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
ynh_app_setting_set "$app" skipped_uris "/"
|
ynh_app_setting_set "$app" skipped_uris "/"
|
||||||
|
|
||||||
if [ $is_public -eq 0 ];
|
if [ $is_public -eq 0 ];
|
||||||
then
|
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
|
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_replace_string " include conf.d/" " #include conf.d/" "$finalnginxconf"
|
||||||
|
|
||||||
ynh_store_file_checksum "$finalnginxconf"
|
ynh_store_file_checksum "$finalnginxconf"
|
||||||
|
|
Loading…
Add table
Reference in a new issue