diff --git a/network/get-wlan-key b/network/get-wlan-key index 8840cd5..d78e8b0 100755 --- a/network/get-wlan-key +++ b/network/get-wlan-key @@ -1,13 +1,16 @@ #!/bin/bash +CLONE_CONF=`dirname $(realpath $0)`; +CLONE_CONF=`dirname $CLONE_CONF`; +CLONE_CONF="$CLONE_CONF/clone/clone.conf"; + echo "1. Checking argument 'ssid'" [ $# -lt 1 ] && echo " > failure" && exit; echo " > done"; echo "2. Fetching SALT and PEPPER from conf"; -source ../clone/clone.conf; -echo " > done"; +source $CLONE_CONF && echo " > done" || echo " > error" || exit 1; echo "3. Processing key";