mirror of
https://github.com/openwrt/packages.git
synced 2026-02-04 12:06:29 +08:00
ddns-scripts: remove rework of OVH provider
This rework was unneeded, rather the fix in https://github.com/openwrt/packages/pull/28174 is required to resolve missing HTTP_AUTH support. The original issue in https://github.com/openwrt/packages/issues/27526 (unable to update OVH DynHost IP address) was wrongly attributed to a change on the OVH API. As discussed in https://github.com/openwrt/packages/issues/28172 the API continues to work for 24.10.5 system, as well as users using wget-ssl. The changes in https://github.com/openwrt/packages/pull/27561 and the followup fix https://github.com/openwrt/packages/pull/27694 add unnecessary dependencies which are heavier than the actually needed minimum. Therefore return the OVH provider to the previous state, and let https://github.com/openwrt/packages/pull/28174 resolved the issue. Signed-off-by: Daniel F. Dickinson <dfdpublic@wildtechgarden.ca>
This commit is contained in:
committed by
Florian Eckert
parent
698cca3a48
commit
01ac2966f7
@@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=ddns-scripts
|
||||
PKG_VERSION:=2.8.2
|
||||
PKG_RELEASE:=83
|
||||
PKG_RELEASE:=84
|
||||
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
|
||||
@@ -143,22 +143,6 @@ define Package/ddns-scripts-digitalocean/description
|
||||
'option password' the api token generated in the DO panel
|
||||
endef
|
||||
|
||||
define Package/ddns-scripts-ovh
|
||||
$(call Package/ddns-scripts/Default)
|
||||
TITLE:=Extension for OVH Dynhost
|
||||
DEPENDS:=ddns-scripts +curl +openssl-util
|
||||
PROVIDES:=ddns-scripts_ovh-dynhost
|
||||
endef
|
||||
|
||||
define Package/ddns-scripts-ovh/description
|
||||
Dynamic DNS Client scripts extension for ovh.com DynHost API.
|
||||
The script directly updates a DNS record using the OVH DynHost API.
|
||||
It requires:
|
||||
'option domain' the dns domain to update the record for (eg. A-record: home.<example.com>)
|
||||
'option username' the dynhost user
|
||||
'option password' the dynhost password
|
||||
endef
|
||||
|
||||
define Package/ddns-scripts-dnspod
|
||||
$(call Package/ddns-scripts/Default)
|
||||
TITLE:=Extension for dnspod.cn API
|
||||
@@ -453,7 +437,6 @@ define Package/ddns-scripts-services/install
|
||||
rm $(1)/usr/share/ddns/default/freedns.42.pl.json
|
||||
rm $(1)/usr/share/ddns/default/godaddy.com-v1.json
|
||||
rm $(1)/usr/share/ddns/default/digitalocean.com-v2.json
|
||||
rm $(1)/usr/share/ddns/default/ovh.com.json
|
||||
rm $(1)/usr/share/ddns/default/dnspod.cn.json
|
||||
rm $(1)/usr/share/ddns/default/dnspod.cn-v3.json
|
||||
rm $(1)/usr/share/ddns/default/no-ip.com.json
|
||||
@@ -595,24 +578,6 @@ fi
|
||||
exit 0
|
||||
endef
|
||||
|
||||
define Package/ddns-scripts-ovh/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib/ddns
|
||||
$(INSTALL_BIN) ./files/usr/lib/ddns/update_ovh_com.sh \
|
||||
$(1)/usr/lib/ddns
|
||||
|
||||
$(INSTALL_DIR) $(1)/usr/share/ddns/default
|
||||
$(INSTALL_DATA) ./files/usr/share/ddns/default/ovh.com.json \
|
||||
$(1)/usr/share/ddns/default
|
||||
endef
|
||||
|
||||
define Package/ddns-scripts-ovh/prerm
|
||||
#!/bin/sh
|
||||
if [ -z "$${IPKG_INSTROOT}" ]; then
|
||||
/etc/init.d/ddns stop
|
||||
fi
|
||||
exit 0
|
||||
endef
|
||||
|
||||
define Package/ddns-scripts-dnspod/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib/ddns
|
||||
$(INSTALL_BIN) ./files/usr/lib/ddns/update_dnspod_cn.sh \
|
||||
@@ -925,7 +890,6 @@ $(eval $(call BuildPackage,ddns-scripts-gcp))
|
||||
$(eval $(call BuildPackage,ddns-scripts-freedns))
|
||||
$(eval $(call BuildPackage,ddns-scripts-godaddy))
|
||||
$(eval $(call BuildPackage,ddns-scripts-digitalocean))
|
||||
$(eval $(call BuildPackage,ddns-scripts-ovh))
|
||||
$(eval $(call BuildPackage,ddns-scripts-dnspod))
|
||||
$(eval $(call BuildPackage,ddns-scripts-dnspod-v3))
|
||||
$(eval $(call BuildPackage,ddns-scripts-noip))
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
# Script for sending user defined updates using the OVH Dynhost API
|
||||
# 2025 David Andreoletti <david at andreoletti dot net>
|
||||
|
||||
# Options passed from /etc/config/ddns:
|
||||
# Domain - the domain name managed by OVH (e.g. example.com)
|
||||
# Username - the dynhost username of the domain (e.g. myrouter)
|
||||
# Password - the dynhost password of the domain
|
||||
|
||||
. /usr/share/libubox/jshn.sh
|
||||
|
||||
# base64 encoding
|
||||
http_basic_encoding() {
|
||||
local user="$1"
|
||||
local password="$2"
|
||||
printf "${user}:${password}" | openssl base64 -in /dev/stdin
|
||||
}
|
||||
|
||||
[ -z "$domain" ] && write_log 14 "Service section not configured correctly! Missing domain name as 'Domain'"
|
||||
[ -z "$username" ] && write_log 14 "Service section not configured correctly! Missing username as 'Username'"
|
||||
[ -z "$password" ] && write_log 14 "Service section not configured correctly! Missing password as 'Password'"
|
||||
|
||||
__STATUS=$(curl -Ss -X GET "https://dns.eu.ovhapis.com/nic/update?system=dyndns&hostname=${domain}&myip=${__IP}" \
|
||||
-H "Authorization: Basic $(http_basic_encoding "$username" "$password")" \
|
||||
-w "%{response_code}\n" -o $DATFILE 2>$ERRFILE)
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
write_log 14 "Curl failed: $(cat $ERRFILE)"
|
||||
return 1
|
||||
elif [ -z $__STATUS ] || [ $__STATUS != 200 ]; then
|
||||
write_log 14 "Curl failed: $__STATUS \novh.com answered: $(cat $DATFILE)"
|
||||
return 1
|
||||
fi
|
||||
@@ -1,9 +1,11 @@
|
||||
{
|
||||
"name": "ovh.com",
|
||||
"ipv4": {
|
||||
"url": "update_ovh_com.sh"
|
||||
"url": "https://[USERNAME]:[PASSWORD]@dns.eu.ovhapis.com/nic/update?system=dyndns&hostname=[DOMAIN]&myip=[IP]",
|
||||
"answer": "good|nochg"
|
||||
},
|
||||
"ipv6": {
|
||||
"url": "update_ovh_com.sh"
|
||||
"url": "https://[USERNAME]:[PASSWORD]@dns.eu.ovhapis.com/nic/update?system=dyndns&hostname=[DOMAIN]&myip=[IP]",
|
||||
"answer": "good|nochg"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user