#!/bin/sh ########################################################################### # # Copyright (c) 2021-2023 Diality Inc. - All Rights Reserved. # # THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN # WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. # # @file wifi_start_wpa_supplicant.sh # # @author (last) Vy # @date (last) 07-Feb-2023 # @author (original) Behrouz NematiPour # @date (original) 11-May-2021 # ############################################################################ if [ $# -eq 0 ]; then currentFile=$(basename "$0") echo "Usage: ./$currentFile " exit 0 fi iface=$1 wpa_supplicant_path=$2 # make sure hardware is up sudo ip link set $iface up # restart the wpa_supplicant service for wifi sudo systemctl restart wpa_supplicant@"$iface".service