mirror of
https://github.com/routerich/RouterichAX3000_configs.git
synced 2026-01-27 12:40:35 +03:00
@@ -301,7 +301,7 @@ done
|
|||||||
|
|
||||||
path_podkop_config="/etc/config/podkop"
|
path_podkop_config="/etc/config/podkop"
|
||||||
path_podkop_config_backup="/root/podkop"
|
path_podkop_config_backup="/root/podkop"
|
||||||
URL="https://raw.githubusercontent.com/routerich/RouterichAX3000_configs/refs/heads/main"
|
URL="https://raw.githubusercontent.com/CodeRoK7/RouterichAX3000_configs/refs/heads/main"
|
||||||
|
|
||||||
if [ -f "/etc/init.d/podkop" ]; then
|
if [ -f "/etc/init.d/podkop" ]; then
|
||||||
printf "Podkop installed. Reconfigured on AWG WARP? (y/n): \n"
|
printf "Podkop installed. Reconfigured on AWG WARP? (y/n): \n"
|
||||||
@@ -342,6 +342,14 @@ printf "\033[32;1mStop and disabled service 'youtubeUnblock' and 'ruantiblock'.
|
|||||||
manage_package "youtubeUnblock" "disable" "stop"
|
manage_package "youtubeUnblock" "disable" "stop"
|
||||||
manage_package "ruantiblock" "disable" "stop"
|
manage_package "ruantiblock" "disable" "stop"
|
||||||
|
|
||||||
|
str=$(grep -i "0 4 \* \* \* wget -O - $URL/configure_zaprets.sh | sh" /etc/crontabs/root)
|
||||||
|
if [ ! -z "$str" ]
|
||||||
|
then
|
||||||
|
grep -v "0 4 \* \* \* wget -O - $URL/configure_zaprets.sh | sh" /etc/crontabs/root > /etc/crontabs/temp
|
||||||
|
cp -f "/etc/crontabs/temp" "/etc/crontabs/root"
|
||||||
|
rm -f "/etc/crontabs/temp"
|
||||||
|
fi
|
||||||
|
|
||||||
printf "\033[32;1mRestart firewall and network...\033[0m\n"
|
printf "\033[32;1mRestart firewall and network...\033[0m\n"
|
||||||
service firewall restart
|
service firewall restart
|
||||||
service network restart
|
service network restart
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
URL="https://raw.githubusercontent.com/routerich/RouterichAX3000_configs/refs/heads/main"
|
URL="https://raw.githubusercontent.com/CodeRoK7/RouterichAX3000_configs/refs/heads/main"
|
||||||
DIR="/etc/config"
|
DIR="/etc/config"
|
||||||
DIR_BACKUP="/root/backup"
|
DIR_BACKUP="/root/backup"
|
||||||
config_files="dhcp
|
config_files="dhcp
|
||||||
@@ -21,6 +21,38 @@ checkAndAddDomainPermanentName()
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
manage_package() {
|
||||||
|
local name="$1"
|
||||||
|
local autostart="$2"
|
||||||
|
local process="$3"
|
||||||
|
|
||||||
|
# Проверка, установлен ли пакет
|
||||||
|
if opkg list-installed | grep -q "^$name"; then
|
||||||
|
|
||||||
|
# Проверка, включен ли автозапуск
|
||||||
|
if /etc/init.d/$name enabled; then
|
||||||
|
if [ "$autostart" = "disable" ]; then
|
||||||
|
/etc/init.d/$name disable
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
if [ "$autostart" = "enable" ]; then
|
||||||
|
/etc/init.d/$name enable
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Проверка, запущен ли процесс
|
||||||
|
if pidof $name > /dev/null; then
|
||||||
|
if [ "$process" = "stop" ]; then
|
||||||
|
/etc/init.d/$name stop
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
if [ "$process" = "start" ]; then
|
||||||
|
/etc/init.d/$name start
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
echo "Upgrade packages..."
|
echo "Upgrade packages..."
|
||||||
|
|
||||||
opkg update
|
opkg update
|
||||||
@@ -147,6 +179,8 @@ then
|
|||||||
echo "$cronTask" >> /etc/crontabs/root
|
echo "$cronTask" >> /etc/crontabs/root
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
manage_package "podkop" "disable" "stop"
|
||||||
|
|
||||||
echo "Restart service..."
|
echo "Restart service..."
|
||||||
|
|
||||||
service youtubeUnblock restart
|
service youtubeUnblock restart
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
URL="https://raw.githubusercontent.com/routerich/RouterichAX3000_configs/refs/heads/main"
|
URL="https://raw.githubusercontent.com/CodeRoK7/RouterichAX3000_configs/refs/heads/main"
|
||||||
DIR="/etc/config"
|
DIR="/etc/config"
|
||||||
DIR_BACKUP="/root/backup"
|
DIR_BACKUP="/root/backup"
|
||||||
config_files="dhcp
|
config_files="dhcp
|
||||||
@@ -27,8 +27,12 @@ service odhcpd restart
|
|||||||
|
|
||||||
echo "Remove cron task auto run script configure zaprets.."
|
echo "Remove cron task auto run script configure zaprets.."
|
||||||
|
|
||||||
grep -v "0 4 \* \* \* wget -O - $URL/configure_zaprets.sh | sh" /etc/crontabs/root > /etc/crontabs/temp
|
str=$(grep -i "0 4 \* \* \* wget -O - $URL/configure_zaprets.sh | sh" /etc/crontabs/root)
|
||||||
cp -f "/etc/crontabs/temp" "/etc/crontabs/root"
|
if [ ! -z "$str" ]
|
||||||
rm -f "/etc/crontabs/temp"
|
then
|
||||||
|
grep -v "0 4 \* \* \* wget -O - $URL/configure_zaprets.sh | sh" /etc/crontabs/root > /etc/crontabs/temp
|
||||||
|
cp -f "/etc/crontabs/temp" "/etc/crontabs/root"
|
||||||
|
rm -f "/etc/crontabs/temp"
|
||||||
|
fi
|
||||||
|
|
||||||
printf "\033[32;1mOff configured completed...\033[0m"
|
printf "\033[32;1mOff configured completed...\033[0m"
|
||||||
|
|||||||
Reference in New Issue
Block a user