-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall_linux_wifi_hotspot.sh
executable file
·64 lines (53 loc) · 2.12 KB
/
install_linux_wifi_hotspot.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
if ! test -f checks/check_system.sh; then
eval "$(curl -fsSL https://raw.githubusercontent.com/excited-bore/dotfiles/main/checks/check_system.sh)"
else
. ./checks/check_system.sh
fi
if ! type update-system &> /dev/null; then
if ! test -f aliases/.bash_aliases.d/update-system.sh; then
eval "$(curl -fsSL https://raw.githubusercontent.com/excited-bore/dotfiles/main/aliases/.bash_aliases.d/update-system.sh)"
else
. ./aliases/.bash_aliases.d/update-system.sh
fi
fi
if ! test -f aliases/.bash_aliases.d/package_managers.sh; then
eval "$(curl -fsSL https://raw.githubusercontent.com/excited-bore/dotfiles/main/aliases/.bash_aliases.d/package_managers.sh)"
else
source aliases/.bash_aliases.d/package_managers.sh
fi
if test -z $SYSTEM_UPDATED; then
readyn -Y "CYAN" -p "Update system?" updatesysm
if test $updatesysm == "y"; then
update-system
fi
fi
if ! type wihotspot &> /dev/null; then
if [ $distro == "Ubuntu" ] && [[ $(check-ppa ppa:lakinduakash/lwh) =~ 'OK' ]]; then
sudo add-apt-repository ppa:lakinduakash/lwh
sudo apt update
eval "$pac_ins linux-wifi-hotspot"
elif [ $distro == "Arch" ]; then
if ! test -z "$AUR_ins"; then
eval "$AUR_ins" linux-wifi-hotspot
else
echo "Install linux-wifi-hotspot from the AUR. If you have an AUR Helper that is not an AUR wrapper, try installing it manually"
fi
elif [ $distro == "Manjaro" ]; then
pamac install linux-wifi-hotspot
sudo aa-complain -d /etc/apparmor.d/ dnsmasq
else
# if test "$distro" == "Fedora" || test "$distro" == "CentOS" || test "$distro" == "RHEL"; then
# git clone https://github.com/lakinduakash/linux-wifi-hotspot
# cd linux-wifi-hotspot
# make
# sudo make install
#fi
fi
wihotspot
if type systemctl &> /dev/null; then
reade -Q "CYAN" -i "y" -p "Enable hotspot on startup with systemctl? "" hotspot
if test $hotspot == "y"; then
systemctl enable create_ap
fi
fi