diff --git a/scripts/install b/scripts/install index b4d5b9d..75f12a7 100644 --- a/scripts/install +++ b/scripts/install @@ -13,10 +13,6 @@ source /usr/share/yunohost/helpers # MANAGE SCRIPT FAILURE #================================================= -ynh_clean_setup () { - ### Remove this function if there's nothing to clean before calling the remove script. - true -} # Exit if an error occurs during the execution of the script ynh_abort_if_errors @@ -41,8 +37,6 @@ test ! -e "$final_path" || ynh_die "This path already contains a folder" # Normalize the url path syntax path_url=$(ynh_normalize_url_path $path_url) -# Check web path availability -ynh_webpath_available $domain $path_url # Register (book) web path ynh_webpath_register $app $domain $path_url @@ -54,21 +48,6 @@ ynh_app_setting_set $app domain $domain ynh_app_setting_set $app path $path_url ynh_app_setting_set $app is_public $is_public -#================================================= -# FIND AND OPEN A PORT -#================================================= - -### Use these lines if you have to open a port for the application -### `ynh_find_port` will find the first available port starting from the given port. -### If you're not using these lines: -### - Remove the section "CLOSE A PORT" in the remove script - -# Find a free port -port=$(ynh_find_port 3000) -# Open this port -yunohost firewall allow --no-upnp TCP $port 2>&1 -ynh_app_setting_set $app port $port - #============================================== # INSTALL POSTGRES #============================================== @@ -142,12 +121,6 @@ ynh_add_nginx_config # SETUP SYSTEMD #================================================= -#cp ../conf/systemd.service /etc/systemd/system/$app.service -#ynh_replace_string "__NODEJS__" "$nodejs_use_version" "/etc/systemd/system/$app.service" -#ynh_replace_string "__ENV_PATH__" "$PATH" "/etc/systemd/system/$app.service" -#ynh_replace_string "__NODE__" "$nodejs_path" "/etc/systemd/system/$app.service" -#ynh_add_systemd_config - ynh_replace_string "__APP__" "$app" "../conf/systemd.service" ynh_replace_string "__FINALPATH__" "$final_path" "../conf/systemd.service" ynh_replace_string "__NODEJS__" "$nodejs_use_version" "../conf/systemd.service" diff --git a/scripts/remove b/scripts/remove index a186acc..538d593 100644 --- a/scripts/remove +++ b/scripts/remove @@ -17,7 +17,6 @@ ynh_print_info "Loading installation settings..." app=$YNH_APP_INSTANCE_NAME domain=$(ynh_app_setting_get $app domain) -port=$(ynh_app_setting_get $app port) db_name=$(ynh_app_setting_get $app db_name) db_user=$db_name final_path=$(ynh_app_setting_get $app final_path) @@ -75,14 +74,6 @@ ynh_print_info "Removing nginx web server configuration" # Remove the dedicated nginx config ynh_remove_nginx_config -#================================================= -# REMOVE PHP-FPM CONFIGURATION -#================================================= -#ynh_print_info "Removing php-fpm configuration" - -# Remove the dedicated php-fpm config -#ynh_remove_fpm_config - #================================================= # REMOVE LOGROTATE CONFIGURATION #================================================= @@ -91,16 +82,6 @@ ynh_print_info "Removing logrotate configuration" # Remove the app-specific logrotate config ynh_remove_logrotate -#================================================= -# CLOSE A PORT -#================================================= - -if yunohost firewall list | grep -q "\- $port$" -then - ynh_print_info "Closing port $port" - ynh_exec_warn_less yunohost firewall disallow TCP $port -fi - #================================================= # SPECIFIC REMOVE #=================================================