From 843c7c0eada604389a5dc761735706b917a26b2b Mon Sep 17 00:00:00 2001 From: Stylix58 <63605602+Stylix58@users.noreply.github.com> Date: Sun, 28 Mar 2021 19:18:33 +0200 Subject: [PATCH 1/9] Update install --- scripts/install | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/install b/scripts/install index 6e5c47b..4de5000 100755 --- a/scripts/install +++ b/scripts/install @@ -54,6 +54,8 @@ ynh_script_progression --message="Validating installation parameters..." --weigh final_path=$path_url test ! -e "$final_path" || ynh_die --message="This path already contains a folder" +echo $final_path + # Register (book) web path if [[ $path_url =~ my_webapp ]] then From 08d021c6271c9b30262980933486cb2444d2b216 Mon Sep 17 00:00:00 2001 From: Stylix58 <63605602+Stylix58@users.noreply.github.com> Date: Sun, 28 Mar 2021 19:22:33 +0200 Subject: [PATCH 2/9] Update install --- scripts/install | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/scripts/install b/scripts/install index 4de5000..d463bec 100755 --- a/scripts/install +++ b/scripts/install @@ -54,17 +54,15 @@ ynh_script_progression --message="Validating installation parameters..." --weigh final_path=$path_url test ! -e "$final_path" || ynh_die --message="This path already contains a folder" -echo $final_path - # Register (book) web path if [[ $path_url =~ my_webapp ]] then mkdir $YNH_APP_ARG_PATH + chown -R www-data.www-data $final_path ynh_webpath_register --app=$app --domain=$domain --path_url=$YNH_APP_ARG_PATH - chown -R my_webapp $final_path else ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url - chown -R www-data.www-data $final_path + chown -R my_webapp $final_path fi From 51772b05d6c728f434fb2e4c4169d14a25f6289e Mon Sep 17 00:00:00 2001 From: Stylix58 <63605602+Stylix58@users.noreply.github.com> Date: Sun, 28 Mar 2021 19:29:29 +0200 Subject: [PATCH 3/9] Update install --- scripts/install | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/scripts/install b/scripts/install index d463bec..cc3ac03 100755 --- a/scripts/install +++ b/scripts/install @@ -57,14 +57,13 @@ test ! -e "$final_path" || ynh_die --message="This path already contains a folde # Register (book) web path if [[ $path_url =~ my_webapp ]] then - mkdir $YNH_APP_ARG_PATH - chown -R www-data.www-data $final_path - ynh_webpath_register --app=$app --domain=$domain --path_url=$YNH_APP_ARG_PATH -else - ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url chown -R my_webapp $final_path +else + chown -R www-data.www-data $final_path fi +ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url + #================================================= # STORE SETTINGS FROM MANIFEST From f9dcf6fb2c1583faa44dad845bfab78b4a338481 Mon Sep 17 00:00:00 2001 From: Stylix58 <63605602+Stylix58@users.noreply.github.com> Date: Sun, 28 Mar 2021 19:33:10 +0200 Subject: [PATCH 4/9] Update install --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index cc3ac03..861a531 100755 --- a/scripts/install +++ b/scripts/install @@ -57,7 +57,7 @@ test ! -e "$final_path" || ynh_die --message="This path already contains a folde # Register (book) web path if [[ $path_url =~ my_webapp ]] then - chown -R my_webapp $final_path + #chown -R my_webapp $final_path else chown -R www-data.www-data $final_path fi From b5fc89eaffaaf90fa34e122b91c6eea79371e166 Mon Sep 17 00:00:00 2001 From: Stylix58 <63605602+Stylix58@users.noreply.github.com> Date: Sun, 28 Mar 2021 19:33:56 +0200 Subject: [PATCH 5/9] Update install --- scripts/install | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/install b/scripts/install index 861a531..c3d1b20 100755 --- a/scripts/install +++ b/scripts/install @@ -58,6 +58,7 @@ test ! -e "$final_path" || ynh_die --message="This path already contains a folde if [[ $path_url =~ my_webapp ]] then #chown -R my_webapp $final_path + echo "pass" else chown -R www-data.www-data $final_path fi From 51152ff9b3a3c7c172fc953ce2aa2d6376adcdaa Mon Sep 17 00:00:00 2001 From: Stylix58 <63605602+Stylix58@users.noreply.github.com> Date: Sun, 28 Mar 2021 19:35:26 +0200 Subject: [PATCH 6/9] Update install --- scripts/install | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/scripts/install b/scripts/install index c3d1b20..7b1487a 100755 --- a/scripts/install +++ b/scripts/install @@ -55,14 +55,6 @@ final_path=$path_url test ! -e "$final_path" || ynh_die --message="This path already contains a folder" # Register (book) web path -if [[ $path_url =~ my_webapp ]] -then - #chown -R my_webapp $final_path - echo "pass" -else - chown -R www-data.www-data $final_path -fi - ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url @@ -118,6 +110,13 @@ ynh_use_logrotate #================================================= ynh_script_progression --message="Configuring permissions..." --weight=1 +if [[ $path_url =~ my_webapp ]] +then + chown -R my_webapp $final_path + echo "pass" +else + chown -R www-data.www-data $final_path +fi #================================================= # END OF SCRIPT From 981f345b1e5900794c6fab8bef0e3663dc00b1aa Mon Sep 17 00:00:00 2001 From: Stylix58 <63605602+Stylix58@users.noreply.github.com> Date: Sun, 28 Mar 2021 19:46:57 +0200 Subject: [PATCH 7/9] Update install --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 7b1487a..b5568fe 100755 --- a/scripts/install +++ b/scripts/install @@ -106,7 +106,7 @@ ynh_script_progression --message="Configuring log rotation..." --weight=1 ynh_use_logrotate #================================================= -# SETUP SSOWAT +# SETUP PERMISSIONS #================================================= ynh_script_progression --message="Configuring permissions..." --weight=1 From 440a586a2ace9b084ea3d45d049da025c0fd59b6 Mon Sep 17 00:00:00 2001 From: Stylix58 <63605602+Stylix58@users.noreply.github.com> Date: Sun, 28 Mar 2021 19:47:28 +0200 Subject: [PATCH 8/9] Update restore --- scripts/restore | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/restore b/scripts/restore index 311e2c9..da00f18 100755 --- a/scripts/restore +++ b/scripts/restore @@ -58,8 +58,12 @@ ynh_restore_file --origin_path="$final_path" # RESTORE USER RIGHTS #================================================= -# Configure internal permissions for ICEcoder -chown -R my_webapp $final_path +if [[ $path_url =~ my_webapp ]] +then + chown -R my_webapp $final_path +else + chown -R www-data.www-data $final_path +fi #================================================= # RESTORE THE LOGROTATE CONFIGURATION From bd8410dfe0cfb6fd935ed18f86f17fc24f3d5592 Mon Sep 17 00:00:00 2001 From: Stylix58 <63605602+Stylix58@users.noreply.github.com> Date: Sun, 28 Mar 2021 19:47:42 +0200 Subject: [PATCH 9/9] Update install --- scripts/install | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/install b/scripts/install index b5568fe..660484e 100755 --- a/scripts/install +++ b/scripts/install @@ -113,7 +113,6 @@ ynh_script_progression --message="Configuring permissions..." --weight=1 if [[ $path_url =~ my_webapp ]] then chown -R my_webapp $final_path - echo "pass" else chown -R www-data.www-data $final_path fi