1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/cockpit_ynh.git synced 2024-09-03 18:16:26 +02:00
This commit is contained in:
ericgaspar 2021-12-06 23:12:58 +01:00
parent dff622dcda
commit 9ac97734ed
No known key found for this signature in database
GPG key ID: 574F281483054D44
4 changed files with 9 additions and 36 deletions

View file

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

View file

@ -39,11 +39,6 @@
},
"example": "/monitor",
"default": "/monitor"
},
{
"name": "is_public",
"type": "boolean",
"default": true
}
]
}

View file

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

View file

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