From 6a3e94173ce03451003074fb50a9c8cd777681c2 Mon Sep 17 00:00:00 2001 From: anmol26s Date: Thu, 13 Sep 2018 12:15:56 +0530 Subject: [PATCH] Added dependencies and permission to 700 --- scripts/install | 5 ++++- scripts/restore | 5 ++++- scripts/upgrade | 5 ++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/scripts/install b/scripts/install index 7ab61c3..cda1915 100755 --- a/scripts/install +++ b/scripts/install @@ -83,6 +83,9 @@ 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" +# install dependencies +ynh_install_app_dependencies php_gd php-xml mailutils + #================================================= # CREATE A MYSQL DATABASE #================================================= @@ -158,7 +161,7 @@ ynh_add_fpm_config #================================================= chown -R $app: $final_path -sudo chmod -R 777 $final_path/data +sudo chmod -R 700 $final_path/data #================================================= # SETUP SSOWAT diff --git a/scripts/restore b/scripts/restore index 10f84a5..4c4ba77 100644 --- a/scripts/restore +++ b/scripts/restore @@ -62,6 +62,9 @@ ynh_restore_file "$final_path" # Create the dedicated user (if not existing) ynh_system_user_create $app +# install dependencies +ynh_install_app_dependencies php_gd php-xml mailutils + #================================================= # RESTORE USER RIGHTS #================================================= @@ -69,7 +72,7 @@ ynh_system_user_create $app # Restore permissions to app files sudo chown -R $app: "${final_path}" -sudo chmod -R 777 $final_path/data +sudo chmod -R 700 $final_path/data #================================================= # RESTORE THE MYSQL DATABASE diff --git a/scripts/upgrade b/scripts/upgrade index 5ca5354..646d41a 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -82,6 +82,9 @@ sudo rm -Rf ${final_path}.old # Create a dedicated nginx config ynh_add_nginx_config +# install dependencies +ynh_install_app_dependencies php_gd php-xml mailutils + #================================================= # CREATE DEDICATED USER #================================================= @@ -104,7 +107,7 @@ ynh_add_fpm_config # Set permissions on app files chown -R $app: $final_path -sudo chmod -R 777 $final_path/data +sudo chmod -R 700 $final_path/data #================================================= # SETUP SSOWAT