Skip to content

Commit

Permalink
Update install.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
HamedAp committed Apr 30, 2024
1 parent 46edcf2 commit 1da956c
Showing 1 changed file with 10 additions and 14 deletions.
24 changes: 10 additions & 14 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -120,18 +120,13 @@ if command -v apt-get >/dev/null; then
apt update -y
apt upgrade -y
rm -fr /etc/php/7.4/apache2/conf.d/00-ioncube.ini
sudo apt -y install software-properties-common
apt install shc gcc -y

sudo add-apt-repository ppa:ondrej/php -y
apt install apache2 zip unzip net-tools curl mariadb-server iptables-persistent vnstat -y

local dependencies=("software-properties-common" "shc" "gcc" "apache2" "zip" "unzip" "net-tools" "curl" "mariadb-server" "curl" "iptables-persistent" "vnstat" "git" "cmake" "cron")
for dep in "${dependencies[@]}"; do
if ! command -v "${dep}" &> /dev/null; then
echo "${dep} is not installed. Installing..."
sudo apt install "${dep}" -y
fi
done


apt install php8.1-sqlite3 -y

string=$(php -v)
if [[ $string == *"8.1"* ]]; then
Expand All @@ -144,12 +139,10 @@ wait
apt remove php* -y
apt remove php -y
apt autoremove -y
apt install php8.1 php8.1-mysql php8.1-xml php8.1-curl -y
fi
sudo apt install php8.1-mbstring php8.1-sqlite3 -y
sudo apt install php8.1-cgi -y
sudo apt install php8.1-sqlite3 -y
apt install php8.1 php8.1-mysql php8.1-xml php8.1-curl cron -y

fi
sudo apt install php8.1-mbstring -y

if [ $# == 0 ]; then
link=$(sudo curl -Ls "https://api.github.com/repos/HamedAp/Ssh-User-management/releases/latest" | grep '"browser_download_url":' | sed -E 's/.*"([^"]+)".*/\1/')
Expand Down Expand Up @@ -287,6 +280,7 @@ if [ -e "$file" ]; then
echo "SSH-CALLS exists"
else

apt install git cmake -y
git clone https://github.com/ambrop72/badvpn.git /root/badvpn
mkdir /root/badvpn/badvpn-build
cd /root/badvpn/badvpn-build
Expand Down Expand Up @@ -454,6 +448,8 @@ systemctl restart sshd
rm -fr /var/www/html/p/favicon.ico
rm -fr /var/www/html/p/favicon.svg

apt install php8.1-cgi -y
apt install php8.1-sqlite3 -y

clear
printf "%s" "$(</var/www/html/shahan.txt)"
Expand Down

0 comments on commit 1da956c

Please sign in to comment.