Have you tried to make another script like this one enter in kate:
#/bin/sh
case ![$][1] in
./bin/sh
network="true"
nmcli nm -c sleep=false -network
eascendasc
and save it as jsin7 file in /etc/network, and call it network.d and this might work fine.