diff --git a/check_process b/check_process index b1210b1..b25c98b 100644 --- a/check_process +++ b/check_process @@ -6,7 +6,7 @@ ; Checks pkg_linter=1 setup_sub_dir=1 - setup_root=0 + setup_root=1 setup_nourl=0 setup_private=1 setup_public=1 @@ -15,7 +15,7 @@ multi_instance=1 incorrect_path=1 port_already_use=0 - change_url=1 + change_url=0 ;;; Levels Level 1=auto Level 2=auto diff --git a/conf/nginx.conf b/conf/nginx.conf index fbcf8b5..b366318 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -27,4 +27,4 @@ location __PATH__ { # Include SSOWAT user panel. include conf.d/yunohost_panel.conf.inc; -} +} \ No newline at end of file diff --git a/scripts/change_url b/scripts/change_url index e768040..ce53487 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -37,13 +37,13 @@ old_path=$(ynh_normalize_url_path $old_path) change_domain=0 if [ "$old_domain" != "$new_domain" ] then - change_domain=1 + change_domain=1 fi change_path=0 if [ "$old_path" != "$new_path" ] then - change_path=1 + change_path=1 fi #================================================= @@ -58,8 +58,6 @@ final_path=/var/www/$app # Change the path in the nginx config file if [ $change_path -eq 1 ] then - # ynh_replace_string - ynh_replace_string --match_string="const WWW_URI = '$old_path/';" --replace_string="const WWW_URI = '$new_path/';" --target_file="$final_path/config.local.php" # Make a backup of the original nginx config file if modified ynh_backup_if_checksum_is_different "$nginx_conf_path" # Replace locations starting with old_path @@ -69,18 +67,18 @@ then ynh_replace_string "return \([[:digit:]]\{3\}\) $old_path" "return \1 $new_path" "$nginx_conf_path" # Calculate and store the nginx config file checksum ynh_store_file_checksum "$nginx_conf_path" -fi - + # ynh_replace_string + ynh_replace_string --match_string="const WWW_URI = '$old_path/';" --replace_string="const WWW_URI = '$new_path/';" --target_file="$final_path/config.local.php" +fi # Change the domain for nginx if [ $change_domain -eq 1 ] then # Delete file checksum for the old conf file location ynh_delete_file_checksum "$nginx_conf_path" - mv $nginx_conf_path /etc/nginx/conf.d/$new_domain.d/$app.conf + mv $nginx_conf_path /etc/nginx/conf.d/$new_domain.d/$app.conf # Store file checksum for the new config file location ynh_store_file_checksum "/etc/nginx/conf.d/$new_domain.d/$app.conf" - # ynh_replace_string fi # GENERIC FINALISATION diff --git a/scripts/install b/scripts/install index 7327a06..b11cf9a 100644 --- a/scripts/install +++ b/scripts/install @@ -87,7 +87,7 @@ ynh_setup_source --dest_dir="$final_path" cp -a $final_path/config.dist.php $final_path/config.local.php # ynh_replace_string --match_string="const ROOT = __DIR__;" --replace_string="const ROOT = /var/www/garradin/;" --target_file="$final_path/config.local.php" -ynh_replace_string --match_string="const PREFER_HTTPS = false;" --replace_string="const PREFER_HTTPS = true;" --target_file="$final_path/config.local.php" +# ynh_replace_string --match_string="const PREFER_HTTPS = false;" --replace_string="const PREFER_HTTPS = true;" --target_file="$final_path/config.local.php" ynh_replace_string --match_string="//const WWW_URI = '/asso/';" --replace_string="const WWW_URI = '$path_url/';" --target_file="$final_path/config.local.php" #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 06ddfde..e92853f 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -148,7 +148,6 @@ fi cp -a $final_path/config.dist.php $final_path/config.local.php # ynh_replace_string --match_string="const ROOT = __DIR__;" --replace_string="const ROOT = /var/www/garradin/;" --target_file="$final_path/config.local.php" -ynh_replace_string --match_string="const PREFER_HTTPS = false;" --replace_string="const PREFER_HTTPS = true;" --target_file="$final_path/config.local.php" ynh_replace_string --match_string="//const WWW_URI = '/asso/';" --replace_string="const WWW_URI = '$path_url/';" --target_file="$final_path/config.local.php" #=================================================