diff --git a/ensure-yggdrasil-is-up.service b/ensure-yggdrasil-is-up.service deleted file mode 100644 index 736ad0f..0000000 --- a/ensure-yggdrasil-is-up.service +++ /dev/null @@ -1,25 +0,0 @@ -# On ChromeOS Yggdrasil does not wake up with the system. -# Systemd is also not aware of system wake-ups. -# Hooking into the ususal wake-up targets does not work: https://gist.github.com/perguth/6d8ac12e655f693e2c4dc377763d08f2/6f7e0389c689967a01f269dae123b9e49f894ef7 -# This script "wakes" Yggdrasil by ensuring it's up by regularly querying `ip`. - -[Unit] -Description=Ensure Yggdrasil is connected by cyclically checking if the interface exists -Documentation=https://github.com/perguth/chromeos-yggdrasil-network-setup - -[Service] -Type=simple -ExecStart=/bin/bash -c '\ - while true; do \ - if ip a show ygg0 up 2>/dev/null | grep inet6.*global >/dev/null; then \ - sleep 10; \ - continue; \ - fi; \ - echo Waking up Yggdrasil.; \ - service yggdrasil restart; \ - sleep 60; \ - done \ -' - -[Install] -WantedBy=multi-user.target