diff --git a/scripts/_common.sh b/scripts/_common.sh index 944a65e..6a48f17 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,6 +4,9 @@ # COMMON VARIABLES #================================================= +# dependencies used by the app +pkg_dependencies="sqlite3" + #================================================= # PERSONAL HELPERS #================================================= diff --git a/scripts/install b/scripts/install index 983c37e..c29d312 100755 --- a/scripts/install +++ b/scripts/install @@ -63,6 +63,13 @@ ynh_script_progression --message="Finding an available port..." --weight=1 port=$(ynh_find_port --port=8095) ynh_app_setting_set --app=$app --key=port --value=$port +#================================================= +# INSTALL DEPENDENCIES +#================================================= +ynh_script_progression --message="Installing dependencies..." --weight=3 + +ynh_install_app_dependencies $pkg_dependencies + #================================================= # CREATE DEDICATED USER #================================================= diff --git a/scripts/remove b/scripts/remove index 96df7cb..d251b71 100755 --- a/scripts/remove +++ b/scripts/remove @@ -48,6 +48,14 @@ ynh_script_progression --message="Removing logrotate configuration..." --weight= # Remove the app-specific logrotate config ynh_remove_logrotate +#================================================= +# REMOVE DEPENDENCIES +#================================================= +ynh_script_progression --message="Removing dependencies..." --weight=2 + +# Remove metapackage and its dependencies +ynh_remove_app_dependencies + #================================================= # REMOVE APP MAIN DIR #================================================= diff --git a/scripts/restore b/scripts/restore index 6e35f2c..3ed09ce 100755 --- a/scripts/restore +++ b/scripts/restore @@ -62,6 +62,16 @@ chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" chmod +x $final_path/traggo-server +#================================================= +# SPECIFIC RESTORATION +#================================================= +# REINSTALL DEPENDENCIES +#================================================= +ynh_script_progression --message="Reinstalling dependencies..." --weight=3 + +# Define and install dependencies +ynh_install_app_dependencies $pkg_dependencies + #================================================= # RESTORE THE NGINX CONFIGURATION #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index a458277..a395c5a 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -86,6 +86,13 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..." - # Create a dedicated NGINX config ynh_add_nginx_config +#================================================= +# UPGRADE DEPENDENCIES +#================================================= +ynh_script_progression --message="Upgrading dependencies..." --weight=3 + +ynh_install_app_dependencies $pkg_dependencies + #================================================= # SETUP SYSTEMD #=================================================