diff --git a/scripts/_common.sh b/scripts/_common.sh index 67ea80b..ecd263f 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -5,7 +5,7 @@ #================================================= # dependencies used by the app -pkg_dependencies="curl" +pkg_dependencies="" #================================================= # PERSONAL HELPERS diff --git a/scripts/install b/scripts/install index ebccc04..afd1d21 100644 --- a/scripts/install +++ b/scripts/install @@ -13,9 +13,6 @@ source /usr/share/yunohost/helpers # MANAGE SCRIPT FAILURE #================================================= -ynh_clean_setup () { - true -} # Exit if an error occurs during the execution of the script ynh_abort_if_errors @@ -68,13 +65,6 @@ sync_port=$(ynh_find_port 22000) ynh_exec_warn_less yunohost firewall allow --no-upnp TCP $sync_port ynh_app_setting_set $app sync_port $sync_port -#================================================= -# INSTALL DEPENDENCIES -#================================================= -ynh_print_info "Installing dependencies..." - -ynh_install_app_dependencies $pkg_dependencies - #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= diff --git a/scripts/remove b/scripts/remove index 2cf471a..3dda65f 100644 --- a/scripts/remove +++ b/scripts/remove @@ -46,14 +46,6 @@ ynh_print_info "Stopping and removing the systemd service" # Remove the dedicated systemd config ynh_remove_systemd_config -#================================================= -# REMOVE DEPENDENCIES -#================================================= -ynh_print_info "Removing dependencies" - -# Remove metapackage and its dependencies -ynh_remove_app_dependencies - #================================================= # REMOVE APP MAIN DIR #================================================= diff --git a/scripts/restore b/scripts/restore index 78ae3d7..ed082eb 100644 --- a/scripts/restore +++ b/scripts/restore @@ -74,14 +74,6 @@ chown -R "$app": $final_path #================================================= # SPECIFIC RESTORATION -#================================================= -# REINSTALL DEPENDENCIES -#================================================= -ynh_print_info "Reinstalling dependencies..." - -# Define and install dependencies -ynh_install_app_dependencies $pkg_dependencies - #================================================= # RESTORE SYSTEMD #================================================= @@ -111,6 +103,14 @@ ynh_print_info "Reloading nginx web server..." systemctl reload nginx +#================================================= +# START SYNCTHING SERVICES +#================================================= +ynh_print_info "Starting Syncthing services..." + +ynh_systemd_action --action=start --service_name=$app --log_path=systemd +#--line_match="Started $app" + #================================================= # END OF SCRIPT #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index f8a913f..01b8405 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -57,20 +57,13 @@ ynh_print_info "Upgrading nginx web server configuration..." # Create a dedicated nginx config ynh_add_nginx_config "gui_port" -#================================================= -# UPGRADE DEPENDENCIES -#================================================= -ynh_print_info "Upgrading dependencies..." - -ynh_install_app_dependencies $pkg_dependencies - #================================================= # CREATE DEDICATED USER #================================================= ynh_print_info "Making sure dedicated system user exists..." # Create a dedicated user (if not existing) -ynh_system_user_create --username=$sync_user --home_dir=$sync_home/ --use_shell +ynh_system_user_create --username=$app --home_dir=$final_path #================================================= # SPECIFIC UPGRADE