diff --git a/microk8s-resources/wrappers/microk8s-reset.wrapper b/microk8s-resources/wrappers/microk8s-reset.wrapper index c5b092cce1..5d71749328 100755 --- a/microk8s-resources/wrappers/microk8s-reset.wrapper +++ b/microk8s-resources/wrappers/microk8s-reset.wrapper @@ -6,6 +6,25 @@ source $SNAP/actions/common/utils.sh KUBECTL="$SNAP/kubectl --kubeconfig=${SNAP_DATA}/credentials/client.config" + +usage() { + cat<&2 + echo "Try '${SNAP_NAME} --help' for more information." + exit 2 + ;; + esac + ;; + h) + usage + exit 0 + ;; + \?) + echo "Invalid option -${OPTARG}" >&2 + echo "Try '${SNAP_NAME} --help' for more information." + exit 2 + ;; + + esac +done + exit_if_stopped exit_if_no_permissions +if ${destroy_storage_enabled} ; then + destroy_storage +fi clean_cluster ${SNAP}/microk8s-stop.wrapper sleep 5 ${SNAP}/microk8s-start.wrapper +