backup: Also run with Ethernet connection
authorMartin Pitt <martin@piware.de>
Mon, 31 May 2021 15:50:38 +0000 (17:50 +0200)
committerMartin Pitt <martin@piware.de>
Mon, 31 May 2021 15:50:38 +0000 (17:50 +0200)
backup

diff --git a/backup b/backup
index c89693b25ad25dc7710c8ed943c144302e3b1504..7a424862cc100015608c6cee15d85a5e0d62c5ae 100755 (executable)
--- a/backup
+++ b/backup
@@ -12,7 +12,7 @@ fi
 # figure out $DISPLAY when running from cron
 export DISPLAY="${DISPLAY:-:0}"
 
-if ! ip route | grep -q '^default.*wl'; then
+if ! ip route show default | grep -Eq 'dev (enp|wl)'; then
     notify-send "Backup skipped, not on WLAN"
     exit 0
 fi