Page MenuHomeSoftware Heritage

dockscript.sh

File Metadata

Author
olasd
Created
Sep 9 2015, 10:33 AM

dockscript.sh

#!/bin/bash
exec > >(/usr/bin/logger -t dockscript)
exec 2>&1
export LC_ALL=C
case "$1" in
add)
/usr/bin/nmcli radio wifi off
/usr/bin/nmcli radio wwan off
while ! [ $(/usr/bin/nmcli -t -f WIRED-PROPERTIES.CARRIER device show eth0) = "WIRED-PROPERTIES.CARRIER:on" ]; do
sleep 1
done
/usr/bin/nmcli connection up id IRILL
/usr/bin/nmcli connection up id "Software Heritage"
;;
remove)
/usr/bin/nmcli connection down id "Software Heritage"
/usr/bin/nmcli connection down id IRILL
/usr/bin/nmcli radio wifi on
/usr/bin/nmcli radio wwan on
;;
esac

Event Timeline