diff --git a/scripts/backup b/scripts/backup index c990ea4..e190c3c 100644 --- a/scripts/backup +++ b/scripts/backup @@ -7,6 +7,11 @@ # IMPORT GENERIC HELPERS #================================================= +if [ ! -e _common.sh ]; then + # Get the _common.sh file if it's not in the current directory + cp ../settings/scripts/_common.sh ./_common.sh + chmod a+rx _common.sh +fi source _common.sh source /usr/share/yunohost/helpers @@ -27,7 +32,6 @@ db_name=$app # Retrieve app settings domain=$(ynh_app_setting_get "$app" domain) -path_url=$(ynh_app_setting_get "$app" path) final_path=$(ynh_app_setting_get "$app" final_path) #================================================= diff --git a/scripts/install b/scripts/install index 75827c3..829758c 100644 --- a/scripts/install +++ b/scripts/install @@ -91,9 +91,8 @@ ynh_install_app_dependencies php5-cli # Initialize database dbpass=$(ynh_string_random) -ynh_app_setting_set "$app" mysqlpwd "$dbpass" -ynh_mysql_create_db "$dbname" "$dbuser" "$dbpass" +ynh_mysql_setup_db "$dbname" "$dbuser" "$dbpass" #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE @@ -202,13 +201,12 @@ chmod -R o-rwx "${final_path}/web/config/" # SETUP SSOWAT #================================================= -# Remove the public access -ynh_app_setting_delete "$app" skipped_uris +# Nothing to do, this app is private #================================================= # RELOAD NGINX and FPM #================================================= # Reload services -service php5-fpm restart +service php5-fpm reload service nginx reload diff --git a/scripts/restore b/scripts/restore index f09260a..1db77b5 100644 --- a/scripts/restore +++ b/scripts/restore @@ -122,5 +122,5 @@ chown -R "$app": "$LOGDIR" # RELOAD NGINX AND PHP-FPM #================================================= -service php5-fpm restart +service php5-fpm reload service nginx reload diff --git a/scripts/upgrade b/scripts/upgrade index 9bf2e84..5abe27f 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -214,13 +214,12 @@ chmod -R o-rwx "${final_path}/web/config/" # SETUP SSOWAT #================================================= -# Remove the public access -ynh_app_setting_delete "$app" skipped_uris +# Nothing to do, this app is private #================================================= # RELOAD NGINX and FPM #================================================= # Reload services -service php5-fpm restart +service php5-fpm reload service nginx reload