diff --git a/clone/clone b/clone/clone index 13b4acc..a60e302 100755 --- a/clone/clone +++ b/clone/clone @@ -1,5 +1,10 @@ #!/bin/sh +echo ">>> Loading configuration file" +sh ./clone.conf || $(echo "<<< error"; exit); +echo "<<< done"; + + [ ! -e ./tmp -o ! -d ./tmp ] && mkdir ./tmp; [ ! -e ./server -o ! -d ./server ] && mkdir ./server; [ ! -e ./server/maintenance -o ! -d ./server/maintenance ] && mkdir ./server/maintenance; @@ -268,7 +273,7 @@ step8(){ step9(){ echo "\n>>> [9] Set up WiFi configuration"; - echo "network={\n\tssid=\"freeboxma\"\n\tpsk=\" manon adrien \"\n}" | sudo tee -a /mnt/etc/wpa_supplicant/wpa_supplicant.conf > /dev/null; + echo "network={\n\tssid=\"$WIFI_SSID"\n\tpsk=\"$WIFI_PASS"\n}" | sudo tee -a /mnt/etc/wpa_supplicant/wpa_supplicant.conf > /dev/null; echo "<<< done"; diff --git a/clone/clone.conf b/clone/clone.conf new file mode 100644 index 0000000..baa6846 --- /dev/null +++ b/clone/clone.conf @@ -0,0 +1,4 @@ + +# WIFI SETTINGS +export WIFI_SSID="some-wifi-ssid"; +export WIFI_PASS="some-wifi-password";