Views:
894β
Votes: 2β
β
Solution
Tags:
network-manager
vpn
cron
nmcli
openconnect
Link:
π See Original Answer on Ask Ubuntu β§ π
URL:
https://askubuntu.com/q/1025048
Title:
Cron job - need script to start VPN if not already running for job
ID:
/2018/04/14/Cron-job-need-script-to-start-VPN-if-not-already-running-for-job
Created:
April 14, 2018
Upload:
September 15, 2024
Layout: post
TOC:
false
Navigation: false
Copy to clipboard: false
From Gnomeβs nmcli website:
$ nmcli con show --active
NAME UUID TYPE DEVICE
TELUS1213-5G a857583c-3f2a-4399-9fc6-3df74b0509f0 802-11-wireless wlp60s0
Wired connection 1 f1d049d0-ad20-3201-ac70-5cb8cc06a6e5 802-3-ethernet enp59s0
To test if a specific connection is active use:
nmcli con show --active <connection_name>