Browse Source

Add proper test_status and logs to yunohost's service integratio

Alexandre Aubin 4 years ago
parent
commit
18140fb3f1
3 changed files with 3 additions and 3 deletions
  1. 1 1
      scripts/install
  2. 1 1
      scripts/restore
  3. 1 1
      scripts/upgrade

+ 1 - 1
scripts/install

@@ -91,7 +91,7 @@ systemctl stop openvpn
 
 # main service
 
-yunohost service add $service_name --description "Tunnels the internet traffic through a VPN" --need_lock
+yunohost service add $service_name --description "Tunnels the internet traffic through a VPN" --need_lock --test_status="systemctl is-active openvpn@client.service" --log "/var/log/ynh-vpnclient.log"
 yunohost service enable $service_name
 
 # checker service

+ 1 - 1
scripts/restore

@@ -117,7 +117,7 @@ systemctl enable "openvpn@.service" --quiet
 # ADVERTISE SERVICE IN ADMIN PANEL
 #=================================================
 
-yunohost service add $service_name --description "Tunnels the internet traffic through a VPN" --need_lock
+yunohost service add $service_name --description "Tunnels the internet traffic through a VPN" --need_lock --test_status="systemctl is-active openvpn@client.service" --log "/var/log/ynh-vpnclient.log"
 
 #=================================================
 # GENERIC FINALIZATION

+ 1 - 1
scripts/upgrade

@@ -82,7 +82,7 @@ ynh_secure_remove ${tmpdir}
 ### Make sure that the yunohost services have a description and need-lock enabled
 
 # main service
-yunohost service add $service_name --description "Tunnels the internet traffic through a VPN" --need_lock
+yunohost service add $service_name --description "Tunnels the internet traffic through a VPN" --need_lock --test_status="systemctl is-active openvpn@client.service" --log "/var/log/ynh-vpnclient.log"
 
 # checker service (this service was previously integrated in yunohost but we do not do this anymore)
 if ynh_exec_warn_less yunohost service status $service_checker_name >/dev/null