-
Notifications
You must be signed in to change notification settings - Fork 0
/
oAMPP_Unix_Fix.sh
58 lines (46 loc) · 1.89 KB
/
oAMPP_Unix_Fix.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/bin/bash
# oAMPP - XAMPP Configuration Helper for Unix-like systems
# Author: VorTexCyberBD
# License: MIT
# Function to display animated text
show_animated_text() {
text="$1"
for (( i=0; i<${#text}; i++ )); do
echo -n "${text:$i:1}"
sleep 0.03
done
echo
}
# Function to show progress bar
show_progress() {
percentage=$1
bar=$(printf '=%.0s' $(seq 1 $((percentage/2))))
spaces=$(printf ' %.0s' $(seq 1 $((50-percentage/2))))
printf "\r[%s%s] %d%%" "$bar" "$spaces" "$percentage"
}
# Main script
clear
show_animated_text "Welcome to oAMPP - XAMPP Configuration Helper for Unix-like systems!"
show_animated_text "Developed by Apache Friends, enhanced by VorTexCyberBD"
# Check if XAMPP is installed
if [ -d "/opt/lampp" ]; then
show_animated_text "XAMPP installation found. Optimizing configuration..."
# Backup original configuration
sudo cp /opt/lampp/etc/httpd.conf /opt/lampp/etc/httpd.conf.backup
# Modify Apache configuration
sudo sed -i 's/^Listen 80/Listen 8080/' /opt/lampp/etc/httpd.conf
sudo sed -i 's/^User daemon/User '$(whoami)'/' /opt/lampp/etc/httpd.conf
sudo sed -i 's/^Group daemon/Group '$(id -gn)'/' /opt/lampp/etc/httpd.conf
show_animated_text "Apache configuration updated. XAMPP will now run on port 8080."
else
show_animated_text "XAMPP installation not found. Please install XAMPP first."
fi
# Download latest XAMPP installer
show_animated_text "Downloading latest XAMPP installer..."
wget -O xampp-installer.run "https://www.apachefriends.org/xampp-files/8.2.4/xampp-linux-x64-8.2.4-0-installer.run"
chmod +x xampp-installer.run
show_animated_text "XAMPP installer downloaded. Run ./xampp-installer.run to install."
show_animated_text "Opening Telegram channel..."
xdg-open "https://t.me/VorTexCyberBD"
show_animated_text "Configuration complete! Thank you for using oAMPP!"
read -p "Press Enter to exit"