-
Notifications
You must be signed in to change notification settings - Fork 0
/
Install
executable file
·77 lines (52 loc) · 1.47 KB
/
Install
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
65
66
67
68
69
70
71
72
73
74
75
76
77
#!/bin/bash
green=$(tput setaf 6)
yellow=$(tput setaf 3)
red=$(tput setaf 1)
reset=`tput sgr0`
SCRIPT="/opt/script"
if [ -d "$SCRIPT" ];then
true
else
mkdir /opt/script
fi
main_app(){
echo "(1/4) .................... Start to Get app From Source.Please Wait ..."
wget https://github.com/KooshaYeganeh/suse/archive/refs/heads/main.zip
echo "(2/4) .................... Unzip main File"
unzip main.zip
cd suse-main
sudo mv suse /opt/script
echo "(3/4) .................... Move Main File to /opt/script"
rm -rf suse-main && rm main.zip
cd
echo "(4/4) .................... remove Unuse Files and Directories"
SUSE="/opt/script/suse"
if [ -f "$SUSE" ];then
echo "suse Installed $green [ OK ] $reset"
echo "$green To use the script, go to /opt /script/ and run the software $reset"
else
echo "suse Not Installed $red [ ERROR ] $reset"
fi
}
network_check=`sudo systemctl status Network_Manager | grep -o "Active: active"`
if [ "network_check" == "Active: active" ];then
check_ip=`ip addr show | grep -o "192.168.1.*"`
if [ "$check_ip"];then
cd /tmp
if [ -f "/tmp/KYGnus" ];then
main_app
else
mkdir /tmp/KYGnus
main_app
fi
else
echo "$red !!! ERROR !!! $reset check NetworkConnections"
echo "$yellow More Help : $reset"
echo "$yellow 1- sudo systemctl start NetworkManager $reset"
echo "$yellow 2- ip addr show | grep -o '192.168.*' $reset"
echo "$yellow 3- ping 4.2.2.4 $reset"
fi
else
systemctl start NetworkManager
main_app
fi