From 0be49bba60d49ac76f9d3c0c872e1c40dfc7574a Mon Sep 17 00:00:00 2001 From: anmol Date: Sat, 17 Oct 2020 05:48:16 +0530 Subject: [PATCH] Added permission for storage folder and updated readme --- README.md | 4 ++-- scripts/install | 11 ++++++++++- scripts/restore | 6 +++--- scripts/upgrade | 2 +- 4 files changed, 16 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 698eaf5..0bffe88 100644 --- a/README.md +++ b/README.md @@ -43,8 +43,8 @@ Change the settings of the app by changing the values in .env ## What works? * [X] Update and remove script * [X] Upgrade script -* [X] Backup and restore script (**Need testing**) -* [X] Multi-instance (**Need testing**) +* [X] Backup and restore script +* [X] Multi-instance * [x] make root domain redirect to index.php * [x] Chang URL (Need testing,backup before trying this) * [ ] LDAP/SSO support diff --git a/scripts/install b/scripts/install index 45efd55..ac92e8c 100755 --- a/scripts/install +++ b/scripts/install @@ -144,22 +144,28 @@ ynh_replace_string --match_string="language" --replace_string="$language" --targ if [ $dav_support -eq 0 ] then ynh_replace_string --match_string="__DAV__" --replace_string="false" --target_file="$config" + dav="Yes" else ynh_replace_string --match_string="__DAV__" --replace_string="true" --target_file="$config" + dav="No" fi # Enable or disable signup for public users if [ $signup -eq 1 ] then ynh_replace_string --match_string="__SIGNUP__" --replace_string="false" --target_file="$config" + sign="No" else ynh_replace_string --match_string="__SIGNUP__" --replace_string="true" --target_file="$config" + sign="Yes" fi # Enable or disable two factor authentication support for users if [ $two_factor -eq 1 ] then ynh_replace_string --match_string="__TWO_FACTOR__" --replace_string="true" --target_file="$config" + twof="Yes" else ynh_replace_string --match_string="__TWO_FACTOR__" --replace_string="false" --target_file="$config" + twof="No" fi #================================================= @@ -209,7 +215,7 @@ ynh_script_progression --message="Securing files and directories..." # Set permissions to app files chown -R $app: $final_path - +chmod -R 775 "$final_path/storage" #================================================= # SETUP SSOWAT #================================================= @@ -245,6 +251,9 @@ echo " | username: $email | password: $password | URL: https://$domain +| Dav support: $dav +| Allowed registration for new users: $sign +| Allowed Two Factor Authentication for accounts: $twof | It is advised to change your password after first login. ----------------------------------------------------------- Setup is done. Have fun. diff --git a/scripts/restore b/scripts/restore index fb6f540..82fa4a5 100755 --- a/scripts/restore +++ b/scripts/restore @@ -37,7 +37,7 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= # CHECK IF THE APP CAN BE RESTORED #================================================= -ynh_script_progression --message="Validating restoration parameters..." +ynh_script_progression --message="Validating restoration parameters..." ynh_webpath_available --domain=$domain --path_url=$path_url \ || ynh_die --message="Path not available: ${domain}${path_url}" @@ -75,7 +75,7 @@ ynh_script_progression --message="Restoring user rights..." # Restore permissions on app files chown -R $app: $final_path - +chmod -R 775 "$final_path/storage" #================================================= # RESTORE THE PHP-FPM CONFIGURATION #================================================= @@ -126,4 +126,4 @@ ynh_systemd_action --service_name=nginx --action=reload # END OF SCRIPT #================================================= -ynh_script_progression --message="Restoration completed for $app" +ynh_script_progression --message="Restoration completed for $app" diff --git a/scripts/upgrade b/scripts/upgrade index c66a796..72ad5b1 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -254,7 +254,7 @@ ynh_script_progression --message="Securing files and directories..." # Set permissions on app files chown -R $app: $final_path - +chmod -R 775 "$final_path/storage" #================================================= # SETUP SSOWAT #=================================================