1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/syncthing_ynh.git synced 2024-09-03 20:26:23 +02:00

Remove dependencies

This commit is contained in:
yalh76 2019-04-14 21:08:31 +02:00
parent eb241a51f4
commit 6671a35e75
5 changed files with 10 additions and 35 deletions

View file

@ -5,7 +5,7 @@
#=================================================
# dependencies used by the app
pkg_dependencies="curl"
pkg_dependencies=""
#=================================================
# PERSONAL HELPERS

View file

@ -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
#=================================================

View file

@ -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
#=================================================

View file

@ -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
#=================================================

View file

@ -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