mirror of
https://github.com/itdoginfo/podkop.git
synced 2025-12-08 12:36:50 +03:00
Execute confdir only for 24 and newer versions
This commit is contained in:
15
install.sh
15
install.sh
@@ -25,12 +25,15 @@ main() {
|
|||||||
|
|
||||||
[ -f /etc/config/dhcp-opkg ] && cp /etc/config/dhcp /etc/config/dhcp-old && mv /etc/config/dhcp-opkg /etc/config/dhcp
|
[ -f /etc/config/dhcp-opkg ] && cp /etc/config/dhcp /etc/config/dhcp-old && mv /etc/config/dhcp-opkg /etc/config/dhcp
|
||||||
fi
|
fi
|
||||||
if uci get dhcp.@dnsmasq[0].confdir | grep -q /tmp/dnsmasq.d; then
|
openwrt_release=$(cat /etc/openwrt_release | grep -Eo [0-9]{2}[.][0-9]{2}[.][0-9]* | cut -d '.' -f 1 | tail -n 1)
|
||||||
echo "confdir alreadt set"
|
if [ $openwrt_release -ge 24 ]; then
|
||||||
else
|
if uci get dhcp.@dnsmasq[0].confdir | grep -q /tmp/dnsmasq.d; then
|
||||||
printf "Setting confdir"
|
echo "confdir alreadt set"
|
||||||
uci set dhcp.@dnsmasq[0].confdir='/tmp/dnsmasq.d'
|
else
|
||||||
uci commit dhcp
|
printf "Setting confdir"
|
||||||
|
uci set dhcp.@dnsmasq[0].confdir='/tmp/dnsmasq.d'
|
||||||
|
uci commit dhcp
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
if [ -f "/etc/init.d/podkop" ]; then
|
if [ -f "/etc/init.d/podkop" ]; then
|
||||||
printf "\033[32;1mPodkop is already installed. Just upgrade it? (y/n)\033[0m\n"
|
printf "\033[32;1mPodkop is already installed. Just upgrade it? (y/n)\033[0m\n"
|
||||||
|
|||||||
Reference in New Issue
Block a user