From cf9c80e4735822df0d5ff3c5f811cde69ee8fc36 Mon Sep 17 00:00:00 2001 From: liberodark Date: Fri, 10 Jan 2020 17:32:40 +0100 Subject: [PATCH] Update install --- scripts/install | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/scripts/install b/scripts/install index a3aec25..c0c316f 100644 --- a/scripts/install +++ b/scripts/install @@ -51,20 +51,20 @@ final_path=/var/www/$app test ! -e "$final_path" || ynh_die "This path already contains a folder" # Normalize the url path syntax -path_url=$(ynh_normalize_url_path $path_url) +path_url=$(ynh_normalize_url_path "$path_url") # Check web path availability -ynh_webpath_available $domain $path_url +ynh_webpath_available "$domain" "$path_url" # Register (book) web path -ynh_webpath_register $app $domain $path_url +ynh_webpath_register "$app" "$domain" "$path_url" #================================================= # STORE SETTINGS FROM MANIFEST #================================================= -ynh_app_setting_set $app domain $domain -ynh_app_setting_set $app path $path_url -ynh_app_setting_set $app is_public $is_public +ynh_app_setting_set "$app" domain "$domain" +ynh_app_setting_set "$app" path "$path_url" +ynh_app_setting_set "$app" is_public "$is_public" #================================================= # INSTALL DEPENDENCIES @@ -96,15 +96,15 @@ ynh_print_info "Creating a MySQL database..." ### - Remove also the section "REMOVE THE MYSQL DATABASE" in the remove script ### - As well as the section "RESTORE THE MYSQL DATABASE" in the restore script -db_name=$(ynh_sanitize_dbid $app) -ynh_app_setting_set $app db_name $db_name -ynh_mysql_setup_db $db_name $db_name +db_name=$(ynh_sanitize_dbid "$app") +ynh_app_setting_set "$app" db_name "$db_name" +ynh_mysql_setup_db "$db_name" "$db_name" #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= -ynh_app_setting_set $app final_path $final_path +ynh_app_setting_set "$app" final_path "$final_path" # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source "$final_path" @@ -120,13 +120,13 @@ ynh_add_nginx_config #================================================= # Create a system user -ynh_system_user_create $app +ynh_system_user_create "$app" #================================================= # MODIFY A CONFIG FILE #================================================= -cp -a ../conf/config.dist.php $final_path/config.php +cp -a ../conf/config.dist.php "$final_path"/config.php ynh_replace_string "yunouser" "$db_name" "$final_path/config.php" ynh_replace_string "yunopass" "$db_pwd" "$final_path/config.php" @@ -154,14 +154,14 @@ ynh_replace_string "yunobase" "$db_name" "$final_path/config.php" ### that really need such authorization. # Set permissions to app files -chown -R www-data:www-data $final_path +chown -R www-data: "$final_path" #================================================= # SETUP SSOWAT #================================================= # If app is public, add url to SSOWat conf as skipped_uris -if [ $is_public -eq 1 ]; then +if [ "$is_public" -eq 1 ]; then # unprotected_uris allows SSO credentials to be passed anyway. ynh_app_setting_set "$app" unprotected_uris "/" fi