easy-mode script and icon for wlanpro

This commit is contained in:
Jed Reynolds
2018-08-15 17:26:19 -07:00
parent 834e5d9a2d
commit 7fcc8b4e6d
2 changed files with 52 additions and 0 deletions

15
WlanPro.desktop Executable file
View File

@@ -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

37
wpro.sh Executable file
View File

@@ -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