-
Notifications
You must be signed in to change notification settings - Fork 0
/
all.sh
39 lines (39 loc) · 1.24 KB
/
all.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
#!/usr/bin/env bash
# Runs All Commands At Once (Part Of Infonata Script).
# Variables:
ip=$(ip addr | grep 'state UP' -A2 | tail -n1 | awk '{print $2}' | cut -f1 -d'/')
ip2=$(wget -qO- ipinfo.io/ip)
user=$(eval getent passwd {$(awk '/^UID_MIN/ {print $2}' /etc/login.defs)..$(awk '/^UID_MAX/ {print $2}' /etc/login.defs)} | cut -d: -f1)
function error {
echo -e "\\e[91m$1\\e[39m"
exit 1
}
echo -e "\e[7mDistro And Software Information:\e[0m"
echo -en '\n'
echo -en '\n'
neofetch || error \e[31mNeofetch was not found, please install it...\e[0m
echo -en '\n'
echo -en '\n'
echo -en '\n'
echo -en '\n'
echo -e "\e[7mHardware Information:\e[0m"
echo -en '\n'
inxi -Fxxx || error \e[31mInxi was not found, please install it...\e[0m
echo -en '\n'
echo -en '\n'
echo -e "\e[7mIP Addresses:\e[0m"
echo "Local Adress: $ip"
echo "Public Adress: $ip2" || error \e[31mUnable to get public IP, please check your internet connection...\e[0m
echo -e "\e[1mPublic IP was checked with ipinfo.io\e[0m"
echo -en '\n'
echo -en '\n'
echo -en '\n'
echo -e "\e[7mSystem Temperature:\e[0m
$(sensors)" || error \e[31Lm-sensors was not found, please install it...\e[0m
echo -en '\n'
echo -en '\n'
echo -en '\n'
echo -en '\n'
echo -e "\e[7mNormal User Accounts In The System:\e[0m
$user"
# End