#!/bin/sh
CON=`LC_ALL=C nmcli d | grep -w connected | sed 's/^.*connected[[:space:]]\+\(.*\)$/\1/'`
if  [ "$CON" = "" ] ; then
  CON=hotspot38855
else
  if echo $CON | grep -q '^--' ; then
    CON=hotspot38855
  else
    sudo nmcli connection down $CON >/dev/null
  fi
fi
sudo nmcli connection up $CON
