Update install.sh
This commit is contained in:
parent
290e2764c0
commit
b5309d2c09
|
@ -168,7 +168,24 @@ fi
|
||||||
|
|
||||||
echo "Updating system..."
|
echo "Updating system..."
|
||||||
|
|
||||||
|
# Need to improve later
|
||||||
|
declare -A osInfo;
|
||||||
|
osInfo[/etc/redhat-release]="yum install"
|
||||||
|
osInfo[/etc/arch-release]="pacman -S -y "
|
||||||
|
osInfo[/etc/gentoo-release]="emerge -s"
|
||||||
|
osInfo[/etc/SuSE-release]="zypp install"
|
||||||
|
osInfo[/etc/debian_version]="apt-get install -y"
|
||||||
|
|
||||||
|
for f in ${!osInfo[@]}
|
||||||
|
do
|
||||||
|
if [[ -f $f ]];then
|
||||||
|
PACK=${osInfo[$f]}
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
# adding repository and keys
|
# adding repository and keys
|
||||||
|
|
||||||
|
if [ $PACK == "apt-get install -y" ];then
|
||||||
if [ "$(cat /etc/apt/sources.list | grep 'deb http://http.kali.org/kali kali-rolling main contrib non-free')" = "" ]; then
|
if [ "$(cat /etc/apt/sources.list | grep 'deb http://http.kali.org/kali kali-rolling main contrib non-free')" = "" ]; then
|
||||||
gpg --keyserver hkp://keys.gnupg.net --recv-key 7D8D0BF6
|
gpg --keyserver hkp://keys.gnupg.net --recv-key 7D8D0BF6
|
||||||
apt-key adv --keyserver pgp.mit.edu --recv-keys ED444FF07D8D0BF6
|
apt-key adv --keyserver pgp.mit.edu --recv-keys ED444FF07D8D0BF6
|
||||||
|
@ -185,7 +202,8 @@ sudo apt-get autoclean -y | tee -a /tmp/fluxionlog.txt
|
||||||
sudo apt-get clean -y | tee -a /tmp/fluxionlog.txt
|
sudo apt-get clean -y | tee -a /tmp/fluxionlog.txt
|
||||||
sudo apt-get update | tee -a /tmp/fluxionlog.txt
|
sudo apt-get update | tee -a /tmp/fluxionlog.txt
|
||||||
sudo apt-get install xterm --yes | tee -a /tmp/fluxionlog.txt
|
sudo apt-get install xterm --yes | tee -a /tmp/fluxionlog.txt
|
||||||
sleep 3
|
fi
|
||||||
|
|
||||||
clear
|
clear
|
||||||
mostrarheader
|
mostrarheader
|
||||||
##############################
|
##############################
|
||||||
|
@ -213,4 +231,6 @@ installer git
|
||||||
installer net-tools
|
installer net-tools
|
||||||
|
|
||||||
# removing repository
|
# removing repository
|
||||||
|
if [ $PACK == "apt-get install -y" ];then
|
||||||
echo "$(cat /etc/apt/sources.list | grep -v 'deb http://http.kali.org/kali kali-rolling main contrib non-free # by fluxion')" > /etc/apt/sources.list
|
echo "$(cat /etc/apt/sources.list | grep -v 'deb http://http.kali.org/kali kali-rolling main contrib non-free # by fluxion')" > /etc/apt/sources.list
|
||||||
|
fi
|
||||||
|
|
Loading…
Reference in New Issue