From 9ac97734ed74715e54085b5b7e8e25b9e26230eb Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 6 Dec 2021 23:12:58 +0100 Subject: [PATCH] Fix --- conf/nginx.conf | 2 +- manifest.json | 5 ----- scripts/install | 28 +++++++--------------------- scripts/remove | 10 +--------- 4 files changed, 9 insertions(+), 36 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 9e0344f..d386d46 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,7 +1,7 @@ #sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; location ^~ __PATH__/ { - proxy_pass http://127.0.0.1:__PORT__; + proxy_pass http://127.0.0.1:__PORT__/; proxy_http_version 1.1; proxy_buffering off; proxy_set_header X-Real-IP $remote_addr; diff --git a/manifest.json b/manifest.json index ab8b47e..5f88acf 100644 --- a/manifest.json +++ b/manifest.json @@ -39,11 +39,6 @@ }, "example": "/monitor", "default": "/monitor" - }, - { - "name": "is_public", - "type": "boolean", - "default": true } ] } diff --git a/scripts/install b/scripts/install index 9101304..87b5f56 100644 --- a/scripts/install +++ b/scripts/install @@ -83,34 +83,20 @@ ynh_script_progression --message="Configuring NGINX web server..." --weight=2 # Create a dedicated NGINX config ynh_add_nginx_config +#================================================= +# INTEGRATE SERVICE IN YUNOHOST +#================================================= +ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 + +yunohost service add cockpit.socket --description="Monitor" --log="/var/log/$app/$app.log" + #================================================= # START SYSTEMD SERVICE #================================================= ynh_script_progression --message="Starting a systemd service..." --weight=2 -# Reload services -#systemctl enable cockpit.socket --quiet -#ynh_systemd_action --service_name=cockpit.socket --action=start - -#================================================= -# ADVERTISE SERVICE IN ADMIN PANEL -#================================================= - -yunohost service add cockpit.socket --description="Monitor" #--log="/var/log/syslog" - ynh_systemd_action --service_name=cockpit.socket --action="start" --log_path="/var/log/$app/$app.log" -#================================================= -# SETUP SSOWAT -#================================================= -# ynh_script_progression --message="Configuring SSOwat..." --weight=1 - -# # Make app public if necessary or protect it -# if [ $is_public -eq 1 ] -# then -# ynh_permission_update --permission "main" --add "visitors" -# fi - #================================================= # RELOAD NGINX #================================================= diff --git a/scripts/remove b/scripts/remove index a327b7a..09dbbb7 100644 --- a/scripts/remove +++ b/scripts/remove @@ -30,7 +30,7 @@ final_path=$(ynh_app_setting_get $app final_path) if ynh_exec_warn_less yunohost service status $app >/dev/null then ynh_script_progression --message="Removing $app service..." --weight=1 - yunohost service remove $app + yunohost service remove cockpit.socket fi #================================================= @@ -49,14 +49,6 @@ ynh_script_progression --message="Removing dependencies..." --weight=1 # Remove metapackage and its dependencies ynh_remove_app_dependencies -#================================================= -# REMOVE APP MAIN DIR -#================================================= -# ynh_print_info "Removing app main directory" - -# # Remove the app directory securely -# ynh_secure_remove "$final_path" - #================================================= # REMOVE NGINX CONFIGURATION #=================================================