I made this much simpler script, please provide feedback
#!/bin/bash
case $2 in
connectivity-change)
case $CONNECTIVITY_STATE in
FULL)
chronyc online
echo "chronyd taken online"
;;
UNKNOWN|NONE|PORTAL|LIMITED)
chronyc offline
echo "chronyd taken offline"
;;
esac
;;
vpn-up|vpn-down)
chronyc offline
chronyc online
echo "chronyd taken online"
;;
esac
Pinned Comments
Freso commented on 2024-10-06 11:12 (UTC)
Arch’s GitLab instance is currently broken(?), so I can’t edit configuration, but merge requests against the package are(/will be) welcome at https://gitlab.archlinux.org/freso/networkmanager-dispatcher-chrony when I’m able to configure repository settings again (default settings aren’t allowing me to upload the existing history).