Skip to content

Commit

Permalink
Update repo
Browse files Browse the repository at this point in the history
  • Loading branch information
BiteDasher committed May 4, 2020
1 parent 77b02df commit 646a260
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion wifigui
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ if [ -z "$(command -v wpa_supplicant)" ]; then zenity --error --text="WPA_Suppli
if [ -z "$(command -v ifconfig)" ]; then zenity --error --text="net-tools not found."; exit; fi
if [ -z "$(command -v iwconfig)" ]; then zenity --error --text="wireless-tools not found."; exit; fi
if [ -z "$(command -v sed)" ]; then zenity --error --text="sed not found."; exit; fi
if [ -z "$(command -v dhclient)" ]; then zenity --error --text="dhclient not found."; exit; fi
if [ -z "$(command -v dhcpcd)" ]; then zenity --error --text="dhcpcd not found."; exit; fi
if [ ! -d /etc/wifiman0 ]; then mkdir /etc/wifiman0; else true; fi
if [ "$(ls -ld /etc/wifiman0 | cut -d' ' -f 1)" != "drwxr-----" ]; then chmod 740 /etc/wifiman0; fi
wfile=/etc/wifiman0/.wmgui
Expand Down
7 changes: 3 additions & 4 deletions wifiman
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ if [ -z "$(command -v wpa_supplicant)" ]; then echo -e "\033[0;31mWPA_Supplicant
if [ -z "$(command -v ifconfig)" ]; then echo -e "\033[0;31mnet-tools not found.\033[0m"; exit; fi
if [ -z "$(command -v iwconfig)" ]; then echo -e "\033[0;31mwireless-tools not found.\033[0m"; exit; fi
if [ -z "$(command -v sed)" ]; then echo -e "\033[0;31msed not found.\033[0m;"; exit; fi
if [ -z "$(command -v dhcpcd)" ]; then echo -e "\033[0;31mdhcpcd not found.\033[0m;"; exit; fi
if [ $UID == 0 ]; then true; else echo "Run this script only as root."; exit; fi
if [ ! -d /etc/wifiman0 ]; then mkdir /etc/wifiman0; else true; fi
if [ "$(ls -ld /etc/wifiman0 | cut -d' ' -f 1)" != "drwxr-----" ]; then chmod 740 /etc/wifiman0; fi
Expand Down Expand Up @@ -42,8 +43,7 @@ EOF
cat <<EOF > /etc/wifiman0/"${essid_name}".bashconf.sh
#!/bin/bash
wpa_supplicant -c /etc/wifiman0/${essid_name}.conf -i ${interface_name} &
dhclient ${interface_name} &
dhclient ${interface_name} -r &
dhcpcd ${interface_name} &
EOF
chmod +x /etc/wifiman0/"${essid_name}".bashconf.sh
cat <<EOF > /etc/systemd/system/wifiman0-"${essid_name}".service
Expand Down Expand Up @@ -153,8 +153,7 @@ EOF
cat <<EOF > /etc/wifiman0/"${essid_name}".bashconf.sh
#!/bin/bash
wpa_supplicant -c /etc/wifiman0/${essid_name}.conf -i ${interface_name} &
dhclient ${interface_name} &
dhclient ${interface_name} -r &
dhcpcd ${interface_name} &
EOF
chmod +x /etc/wifiman0/"${essid_name}".bashconf.sh
cat <<EOF > /etc/systemd/system/wifiman0-"${essid_name}".service
Expand Down

0 comments on commit 646a260

Please sign in to comment.