diff --git a/WlanPro.desktop b/WlanPro.desktop new file mode 100755 index 00000000..dc63b272 --- /dev/null +++ b/WlanPro.desktop @@ -0,0 +1,15 @@ +#!/usr/bin/env xdg-open +[Desktop Entry] +Version=1.0 +Encoding=UTF-8 +Name=WLANPro Test +Name[en_US.ISO8859-1]=WLANPro Test +Comment=WLANPro Test +Comment[en_US.ISO8859-1]=WLANPro Test +Path=/home/lanforge/Desktop +Exec=/home/lanforge/Desktop/wpro.sh +Icon=/usr/share/icons/Adwaita/scalable/apps/utilities-terminal-symbolic.svg +Type=Application +Terminal=true +Categories=Network;X-Candela-Technologies +GenericName[en_US]=WLANPro Test diff --git a/wpro.sh b/wpro.sh new file mode 100755 index 00000000..0684fbdf --- /dev/null +++ b/wpro.sh @@ -0,0 +1,37 @@ +#!/bin/bash + +ssid="" +security="open" +passphrase="" + +read -p "Name of SSID: " SSID +read -p "open or wpa2: " SECURITY +if [[ "$SECURITY" = "wpa2" ]]; then + read -p "Passphrase: " PASSPHRASE +fi +if [ -z "$SSID" ]; then + echo "Blank SSID, bye." + exit 1 +fi +ssid="--ssid \"$SSID\"" + +if [ -z "$SECURITY" ]; then + echo "Blank SECURITY, bye." + exit 1 +fi +security="--security $SECURITY" + +if [[ "$SECURITY" = "wpa2" ]]; then + passphrase="--passphrase \"$PASSPHRASE\"" +fi + +cd /home/lanforge/scripts +cmd="./wlanpro_test.pl --manager lanforge-74bb \ + --gui_host localhost --gui_port 7777 \ + --ip 5.5.5.2 --netmask 255.255.255.0 \ + --upstream_resource 1 --upstream_port eth4 --interferer_cx inter_r3_w0 \ + --ssid "$SSID" $security $passphrase \ + --testcase -1" +echo "$cmd" +read -p "Look good?" +$cmd