#!/bin/bash
function ifup
{
	declare output
	output=$(sudo ip link show cell-area-zone up) && [[ -n $output ]]
}
if ifup
then
	sudo ip link set up manufact-zone
	sudo nmcli connection up "Manufacturing Zone"
	sudo nmcli connection down "Cell-Area Zone"
	sudo ip link set down cell-area-zone
else
	sudo ip link set up cell-area-zone
	sudo nmcli connection up "Cell-Area Zone"
	sudo nmcli connection down "Manufacturing Zone"
	sudo ip link set down manufact-zone
fi
