-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathezp.sh
140 lines (105 loc) · 3.63 KB
/
ezp.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
#!/bin/bash
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
BLUE='\033[0;34m'
MAGENTA='\033[0;35m'
CYAN='\033[0;36m'
GRAY='\033[0;37m'
NC='\033[0m' # No Color
echo "Running as root..."
sleep 2
clear
uci set system.@system[0].zonename='Asia/Tehran'
uci set system.@system[0].timezone='<+0330>-3:30'
uci commit
uci set system.@system[0].hostname='PeDitXOS'
uci commit system
/etc/init.d/system restart
sed -i 's/DISTRIB_ID=.*/DISTRIB_ID="PeDitXOS"/' /etc/openwrt_release
sed -i 's/DISTRIB_DESCRIPTION=.*/DISTRIB_DESCRIPTION="PeDitX OS telegram:@peditx"/' /etc/openwrt_release
/sbin/reload_config
cp ezp.sh /sbin/passwall
echo -e "${MAGENTA}
______ _____ _ _ _ _____
(_____ \ (____ \ (_)_ \ \ / / / ___ \
_____) )___ _ \ \ _| |_ \ \/ / | | | | ___
| ____/ _ ) | | | | _) ) ( | | | |/___)
| | ( (/ /| |__/ /| | |__ / /\ \ | |___| |___ |
|_| \____)_____/ |_|\___)_/ \_\ \_____/(___/
E Z P A S S W A L L v2 ${NC}"
sleep 3
# First Reform
opkg update
opkg install curl luci-compat
opkg install luci-lib-ipkg
sleep 2
clear
opkg install luci-app-ttyd
sleep 2
opkg remove uci-mod-dashboard
sleep 2
opkg install whiptail
sleep 2
# Function to install a theme
install_theme() {
local REPO_NAME=$1
local THEME_NAME=$2
echo "Processing $THEME_NAME..."
# GitHub repository URL and package name
LATEST_RELEASE_URL="https://api.github.com/repos/peditx/$REPO_NAME/releases/latest"
IPK_URL=$(curl -s $LATEST_RELEASE_URL | grep "browser_download_url.*ipk" | cut -d '"' -f 4)
# Check if the download link is found
if [ -z "$IPK_URL" ]; then
echo "Download link for the .ipk file of $THEME_NAME not found."
return 1
fi
# Download the .ipk package
echo "Downloading the latest version of $THEME_NAME..."
wget -q $IPK_URL -O /tmp/$THEME_NAME.ipk
# Install the .ipk package
echo "Installing $THEME_NAME..."
opkg install /tmp/$THEME_NAME.ipk
# Clean up the downloaded file
rm /tmp/$THEME_NAME.ipk
echo "$THEME_NAME installed successfully."
}
# Install luci-theme-peditx
install_theme "luci-theme-peditx" "luci-theme-peditx"
# Install luci-theme-carbonpx
install_theme "luci-theme-carbonpx" "luci-theme-carbonpx"
opkg remove luci-theme-bootstrap --force-depends
# Restart the web service to apply the changes
echo "Restarting uhttpd service to apply changes..."
/etc/init.d/uhttpd restart
clear
### install themeswitch
echo -e "${GREEN}New theme Installed ✅ OK${NC}"
sleep 2
echo -e "${GREEN}Android mobile app service Installed ✅ OK${NC}"
sleep 2
echo -e "${GREEN}Ios native Web application Installed ✅ OK${NC}"
sleep 2
echo -e "${GREEN}New version of PeDitX theme Installed ✅ OK${NC}"
sleep 5
clear
rm -f setup.sh && wget https://raw.githubusercontent.com/peditx/iranIPS/refs/heads/main/.files/core/setup.sh && chmod 777 setup.sh
clear
##Scanning
. /etc/openwrt_release
echo -e "${MAGENTA}
______ _____ _ _ _ _____
(_____ \ (____ \ (_)_ \ \ / / / ___ \
_____) )___ _ \ \ _| |_ \ \/ / | | | | ___
| ____/ _ ) | | | | _) ) ( | | | |/___)
| | ( (/ /| |__/ /| | |__ / /\ \ | |___| |___ |
|_| \____)_____/ |_|\___)_/ \_\ \_____/(___/
E Z P A S S W A L L v2 ${NC}"
EPOL=`cat /tmp/sysinfo/model`
echo " - Model : $EPOL"
echo " - System Ver : $DISTRIB_RELEASE"
echo " - System Arch : $DISTRIB_ARCH"
# RESULT=`echo "$DISTRIB_RELEASE" | grep -o 23 | sed -n '1p'`
sleep 5
# if [ "$RESULT" == "23" ]; then
sh setup.sh