mirror of
https://github.com/routerich/RouterichAX3000_configs.git
synced 2025-12-06 11:36:43 +03:00
Check and stop service Podkop
This commit is contained in:
@@ -21,6 +21,38 @@ checkAndAddDomainPermanentName()
|
||||
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..."
|
||||
|
||||
opkg update
|
||||
@@ -147,6 +179,8 @@ then
|
||||
echo "$cronTask" >> /etc/crontabs/root
|
||||
fi
|
||||
|
||||
manage_package "podkop" "disable" "stop"
|
||||
|
||||
echo "Restart service..."
|
||||
|
||||
service youtubeUnblock restart
|
||||
|
||||
Reference in New Issue
Block a user