From e0e550ad1187e10bcd730675c11714a075abc4a0 Mon Sep 17 00:00:00 2001 From: Christian Breunig Date: Tue, 14 Feb 2023 19:47:23 +0100 Subject: strongSwan: T4593: move to charon-systemd --- op-mode-definitions/monitor-log.xml.in | 4 ++-- op-mode-definitions/show-log.xml.in | 4 ++-- op-mode-definitions/vpn-ipsec.xml.in | 12 ++++++------ 3 files changed, 10 insertions(+), 10 deletions(-) (limited to 'op-mode-definitions') diff --git a/op-mode-definitions/monitor-log.xml.in b/op-mode-definitions/monitor-log.xml.in index ec428a676..d5892398b 100644 --- a/op-mode-definitions/monitor-log.xml.in +++ b/op-mode-definitions/monitor-log.xml.in @@ -274,13 +274,13 @@ Monitor last lines of ALL VPNs - journalctl --no-hostname --boot --follow --unit strongswan-starter.service --unit accel-ppp@*.service --unit ocserv.service + journalctl --no-hostname --boot --follow --unit strongswan.service --unit accel-ppp@*.service --unit ocserv.service Monitor last lines of IPsec - journalctl --no-hostname --boot --follow --unit strongswan-starter.service + journalctl --no-hostname --boot --follow --unit strongswan.service diff --git a/op-mode-definitions/show-log.xml.in b/op-mode-definitions/show-log.xml.in index f5e5b1493..c626e45fb 100644 --- a/op-mode-definitions/show-log.xml.in +++ b/op-mode-definitions/show-log.xml.in @@ -421,13 +421,13 @@ Show log for ALL - journalctl --no-hostname --boot --unit strongswan-starter.service --unit accel-ppp@*.service --unit ocserv.service + journalctl --no-hostname --boot --unit strongswan.service --unit accel-ppp@*.service --unit ocserv.service Show log for IPsec - journalctl --no-hostname --boot --unit strongswan-starter.service + journalctl --no-hostname --boot --unit strongswan.service diff --git a/op-mode-definitions/vpn-ipsec.xml.in b/op-mode-definitions/vpn-ipsec.xml.in index f6b5e6020..eca9f6fd9 100644 --- a/op-mode-definitions/vpn-ipsec.xml.in +++ b/op-mode-definitions/vpn-ipsec.xml.in @@ -53,11 +53,11 @@ - + Restart the IPsec VPN process - if pgrep charon >/dev/null ; then sudo ipsec restart ; sleep 3 ; sudo swanctl -q ; else echo "IPsec process not running" ; fi + if systemctl is-active --quiet strongswan; then sudo systemctl restart strongswan ; echo "IPsec process restarted"; else echo "IPsec process not running" ; fi @@ -128,7 +128,7 @@ Show summary of IKE process information - if pgrep charon >/dev/null ; then echo "Running: $(pgrep charon)" ; else echo "Process is not running" ; fi + if systemctl is-active --quiet strongswan ; then systemctl status strongswan ; else echo "Process is not running" ; fi @@ -190,10 +190,10 @@ Show Verbose Detail on all active IPsec Security Associations (SA) - if pgrep charon >/dev/null ; then sudo /usr/sbin/ipsec statusall ; else echo "IPsec process not running" ; fi + if systemctl is-active --quiet strongswan ; then sudo /usr/sbin/ipsec statusall ; else echo "IPsec process not running" ; fi - if pgrep charon >/dev/null ; then sudo ${vyos_op_scripts_dir}/ipsec.py show_sa ; else echo "IPsec process not running" ; fi + if systemctl is-active --quiet strongswan ; then sudo ${vyos_op_scripts_dir}/ipsec.py show_sa ; else echo "IPsec process not running" ; fi @@ -205,7 +205,7 @@ Show status of IPsec process - if pgrep charon >/dev/null ; then echo -e "IPsec Process Running: $(pgrep charon)\n$(sudo /usr/sbin/ipsec status)" ; else echo "IPsec process not running" ; fi + if systemctl is-active --quiet strongswan >/dev/null ; then echo -e "IPsec Process Running: $(pgrep charon)\n$(sudo /usr/sbin/ipsec status)" ; else echo "IPsec process not running" ; fi -- cgit v1.2.3