mirror of
https://github.com/remittor/zapret-openwrt.git
synced 2025-12-06 11:36:48 +03:00
[install] Add detect for installed original zapret
This commit is contained in:
@@ -97,6 +97,13 @@ define Package/$(PKG_NAME)/preinst
|
||||
#!/bin/sh
|
||||
# check if we are on real system
|
||||
if [ -z "$${IPKG_INSTROOT}" ]; then
|
||||
if [ -f "/etc/init.d/zapret" ]; then
|
||||
SCRIPT=$$( readlink /etc/init.d/zapret )
|
||||
if [ -n "$${SCRIPT}" ]; then
|
||||
echo "Please uninstall original zapret utility!"
|
||||
exit 44
|
||||
fi
|
||||
fi
|
||||
if [ "$${PKG_UPGRADE}" = "1" ]; then
|
||||
# stop service if PKG_UPGRADE
|
||||
[ -x "/etc/init.d/zapret" ] && /etc/init.d/zapret stop >/dev/null 2>&1
|
||||
|
||||
Reference in New Issue
Block a user