diff --git a/scripts/_common.sh b/scripts/_common.sh index 319f198..575ce13 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -5,7 +5,7 @@ #================================================= # dependencies used by the app -pkg_dependencies="rrdtool rrdcached collectd" +#pkg_dependencies="rrdtool rrdcached collectd" #================================================= # PERSONAL HELPERS diff --git a/scripts/install b/scripts/install index 02bcc50..65083ec 100755 --- a/scripts/install +++ b/scripts/install @@ -22,6 +22,7 @@ ynh_abort_if_errors domain=$YNH_APP_ARG_DOMAIN path_url=$YNH_APP_ARG_PATH is_public=$YNH_APP_ARG_IS_PUBLIC +architecture=$(ynh_detect_arch) app=$YNH_APP_INSTANCE_NAME @@ -58,9 +59,9 @@ ynh_app_setting_set --app=$app --key=port --value=$port #================================================= # INSTALL DEPENDENCIES #================================================= -ynh_script_progression --message="Installing dependencies..." --weight=9 +# ynh_script_progression --message="Installing dependencies..." --weight=9 -ynh_install_app_dependencies $pkg_dependencies +# ynh_install_app_dependencies $pkg_dependencies #================================================= # CREATE DEDICATED USER @@ -88,7 +89,7 @@ ynh_script_progression --message="Setting up source files..." --weight=4 ynh_app_setting_set --app=$app --key=final_path --value=$final_path # Download, check integrity, uncompress and patch the source from app.src -ynh_setup_source --dest_dir=$final_path +ynh_setup_source --dest_dir=$final_path --source_id="$architecture" chmod 750 "$final_path" chmod -R o-rwx "$final_path" diff --git a/scripts/restore b/scripts/restore index f67d182..01230fb 100755 --- a/scripts/restore +++ b/scripts/restore @@ -72,6 +72,14 @@ chmod 750 "$final_path" chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" +#================================================= +# REINSTALL DEPENDENCIES +#================================================= +ynh_script_progression --message="Reinstalling dependencies..." --time --weight=1 + +# Define and install dependencies +ynh_install_app_dependencies $pkg_dependencies + #================================================= # RESTORE THE MYSQL DATABASE #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 2ceb8eb..f449fb8 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -18,7 +18,6 @@ app=$YNH_APP_INSTANCE_NAME domain=$(ynh_app_setting_get $app domain) path_url=$(ynh_app_setting_get $app path) admin=$(ynh_app_setting_get $app admin) -is_public=$(ynh_app_setting_get $app is_public) final_path=$(ynh_app_setting_get $app final_path) port=$(ynh_app_setting_get $app port) db_name=$(ynh_app_setting_get $app db_name) @@ -103,11 +102,18 @@ chown -R $app:www-data "$final_path" #================================================= # NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Upgrading NGINX web server configuration..." --time --weight=1 +ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=1 # Create a dedicated NGINX config ynh_add_nginx_config +#================================================= +# UPGRADE DEPENDENCIES +#================================================= +# ynh_script_progression --message="Upgrading dependencies..." --weight=1 + +# ynh_install_app_dependencies $pkg_dependencies + #================================================= # UPDATE A CONFIG FILE #================================================= @@ -115,8 +121,8 @@ ynh_script_progression --message="Updating a configuration file..." --weight=1 ynh_add_config --template="../conf/facette.yaml" --destination="$final_path/facette.yaml" -chmod 400 "$final_path/some_config_file" -chown $app:$app "$final_path/some_config_file" +chmod 400 "$final_path/facette.yaml" +chown $app:$app "$final_path/facette.yaml" #================================================= # SETUP SYSTEMD