Skip to content

Commit 16b69ea

Browse files
authored
Update ssh-vpn_install.sh
fix some erorrs
1 parent ee05e57 commit 16b69ea

File tree

1 file changed

+15
-22
lines changed

1 file changed

+15
-22
lines changed

ssh-vpn_install.sh

Lines changed: 15 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,20 @@ if [[ -n "${passwordtmp}" ]]; then
2626
fi
2727
fi
2828
ipv4=$(curl rabin.cf)
29-
sudo sed -i '/www-data/d' /etc/sudoers
30-
sudo sed -i '/apache/d' /etc/sudoers
29+
sudo sed -i '/www-data/d' /etc/sudoers &
30+
wait
31+
sudo sed -i '/apache/d' /etc/sudoers &
32+
wait
33+
3134
if command -v apt-get >/dev/null; then
3235
apt update -y
36+
apt remove php8* -y
3337
sudo apt -y install software-properties-common
38+
3439
sudo add-apt-repository ppa:ondrej/php -y
35-
apt remove php8* -y
36-
apt install apache2 php7.4 zip unzip net-tools curl mariadb-server php7.4-mysql php7.4-xml php7.4-curl -y
40+
41+
apt install apache2 zip unzip net-tools curl mariadb-server -y
42+
apt install php7.4 php7.4-mysql php7.4-xml php7.4-curl -y
3743
sudo wget -O /var/www/html/update.zip https://github.com/zero-zoro/free-ssh-vpn-panel/releases/download/ssh-vpn-panel/sshvpn-panel.zip
3844
sudo unzip -o /var/www/html/update.zip -d /var/www/html/ &
3945
wait
@@ -87,15 +93,8 @@ echo 'www-data ALL=(ALL:ALL) NOPASSWD:/usr/local/sbin/nethogs' | sudo EDITOR='te
8793
wait
8894
echo 'www-data ALL=(ALL:ALL) NOPASSWD:/usr/sbin/iptables' | sudo EDITOR='tee -a' visudo &
8995
wait
90-
rm -fr /var/www/html/p/.htaccess
9196

92-
echo '<Directory /var/www/html/p/>
93-
Options Indexes FollowSymLinks
94-
AllowOverride All
95-
Require all granted
96-
</Directory>' >> /etc/apache2/apache2.conf
9797
sudo service apache2 restart
98-
sudo htpasswd -b -c /etc/apache2/.htpasswd ${adminusername} ${adminpassword}
9998
chown www-data:www-data /var/www/html/p/* &
10099
wait
101100
systemctl restart mariadb &
@@ -172,15 +171,9 @@ echo 'apache ALL=(ALL:ALL) NOPASSWD:/usr/sbin/iptables' | sudo EDITOR='tee -a' v
172171
wait
173172
po=$(cat /etc/ssh/sshd_config | grep "^Port")
174173
port=$(echo "$po" | sed "s/Port //g")
175-
rm -fr /var/www/html/p/.htaccess
176-
echo '<Directory /var/www/html/p/>
177-
Options Indexes FollowSymLinks
178-
AllowOverride All
179-
Require all granted
180-
</Directory>' >> /etc/httpd/conf/httpd.conf
174+
181175
systemctl restart httpd
182176
systemctl enable httpd
183-
sudo htpasswd -b -c /etc/httpd/.htpasswd ${adminusername} ${adminpassword}
184177
chown apache:apache /var/www/html/p/* &
185178
wait
186179
sudo sed -i "s/apache2/httpd/g" /var/www/html/p/setting.php &
@@ -191,12 +184,12 @@ sudo phpenmod curl
191184
PHP_INI=$(php -i | grep /.+/php.ini -oE)
192185
sed -i 's/extension=intl/;extension=intl/' ${PHP_INI}
193186
fi
194-
bash <(curl -Ls https://raw.githubusercontent.com/zero-zoro/free-ssh-vpn-panel/main/ionCubeLoader/install.sh --ipv4)
195-
bash <(curl -Ls https://raw.githubusercontent.com/zero-zoro/free-ssh-vpn-panel/main/Nethogs-Json/install.sh --ipv4)
196187
fggh=`cat /etc/hosts | grep -w konusanlar.tk`
197188
if [ "${fggh}" == "" ]; then
198189
sudo echo "127.0.0.1 konusanlar.tk" >> /etc/hosts
199190
fi
191+
bash <(curl -Ls https://raw.githubusercontent.com/zero-zoro/free-ssh-vpn-panel/main/ionCubeLoader/install.sh --ipv4)
192+
bash <(curl -Ls https://raw.githubusercontent.com/zero-zoro/free-ssh-vpn-panel/main/Nethogs-Json/install.sh --ipv4)
200193
mysql -e "create database ShaHaN;" &
201194
wait
202195
mysql -e "CREATE USER '${adminusername}'@'localhost' IDENTIFIED BY '${adminpassword}';" &
@@ -220,8 +213,8 @@ cp /var/www/html/p/tarikh /var/www/html/p/backup/tarikh
220213
rm -fr /var/www/html/p/tarikh
221214
crontab -l | grep -v '/p/expire.php' | crontab -
222215
crontab -l | grep -v '/p/synctraffic.php' | crontab -
223-
(crontab -l ; echo "* * * * * curl -u $adminusername:$adminpassword http://${ipv4}/p/expire.php >/dev/null 2>&1
224-
* * * * * curl -u $adminusername:$adminpassword http://${ipv4}/p/synctraffic.php >/dev/null 2>&1" ) | crontab - &
216+
(crontab -l ; echo "* * * * * curl http://${ipv4}/p/expire.php >/dev/null 2>&1
217+
* * * * * curl http://${ipv4}/p/synctraffic.php >/dev/null 2>&1" ) | crontab - &
225218
wait
226219
clear
227220
printf "\nSSH-VPN Free Panel \n"

0 commit comments

Comments
 (0)