pinwheel: Use the Cloudflare One client for the work VPN
This commit is contained in:
9 files changed
+63
-91
No files matched your search
@@ -94,7 +94,7 @@ let
|
||||
|
||||
work-vpn = pkgs.writeShellScript "work-vpn" ''
|
||||
connected() {
|
||||
systemctl is-active --quiet openvpn-work-staging.service openvpn-work-production.service
|
||||
warp-cli --accept-tos status | ${pkgs.gnugrep}/bin/grep -q "Status update: Connected"
|
||||
}
|
||||
|
||||
output() {
|
||||
@@ -107,9 +107,9 @@ let
|
||||
|
||||
toggle() {
|
||||
if connected; then
|
||||
systemctl stop work-vpn.target && ${pkgs.libnotify}/bin/notify-send "Disconnected from work VPN"
|
||||
work-vpn down && ${pkgs.libnotify}/bin/notify-send "Disconnected from work VPN"
|
||||
else
|
||||
systemctl start work-vpn.target && ${pkgs.libnotify}/bin/notify-send "Connected to work VPN"
|
||||
work-vpn up && ${pkgs.libnotify}/bin/notify-send "Connected to work VPN"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user