From 3d4ef03ad27f8f2c81b6dc305821ca01816373e3 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Wed, 29 Apr 2020 22:03:58 +0200 Subject: [PATCH] Dirty hack to check status of ynh-vpnclient for real --- src/yunohost/service.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/yunohost/service.py b/src/yunohost/service.py index 7c6b28b10..2f45e28c3 100644 --- a/src/yunohost/service.py +++ b/src/yunohost/service.py @@ -581,6 +581,14 @@ def _get_services(): if len(ssh_port_line) == 1: services["ssh"]["needs_exposed_ports"] = [int(ssh_port_line[0])] + # Dirty hack to check the status of ynh-vpnclient + if "ynh-vpnclient" in services: + status_check = "systemctl is-active openvpn@client.service" + if "test_status" not in services["ynh-vpnclient"]: + services["ynh-vpnclient"]["test_status"] = status_check + if "log" not in services["ynh-vpnclient"]: + services["ynh-vpnclient"]["log"] = ["/var/log/ynh-vpnclient.log"] + # Stupid hack for postgresql which ain't an official service ... Can't # really inject that info otherwise. Real service we want to check for # status and log is in fact postgresql@x.y-main (x.y being the version)