mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-11-03 19:23:56 +08:00
🚀 Sync 2026-06-01 17:14:40
This commit is contained in:
1 parent
7639aed22a
commit
58c1dab33b
3 files changed
+2
-21
No files matched your search
@@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
|
|||||||
|
|
||||||
PKG_NAME:=hickory-dns
|
PKG_NAME:=hickory-dns
|
||||||
PKG_VERSION:=0.26.1
|
PKG_VERSION:=0.26.1
|
||||||
PKG_RELEASE:=28
|
PKG_RELEASE:=29
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:=https://codeload.github.com/hickory-dns/hickory-dns/tar.gz/v$(PKG_VERSION)?
|
PKG_SOURCE_URL:=https://codeload.github.com/hickory-dns/hickory-dns/tar.gz/v$(PKG_VERSION)?
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ axfr_policy = "AllowAll"
|
|||||||
[zones.stores]
|
[zones.stores]
|
||||||
type = "sqlite"
|
type = "sqlite"
|
||||||
zone_path = "/etc/hickory-dns/lan.zone"
|
zone_path = "/etc/hickory-dns/lan.zone"
|
||||||
journal_path = "/var/lib/hickory-dns/lan.jrnl"
|
journal_path = ":memory:"
|
||||||
allow_update = true
|
allow_update = true
|
||||||
|
|
||||||
[[zones.stores.tsig_keys]]
|
[[zones.stores.tsig_keys]]
|
||||||
|
|||||||
@@ -12,9 +12,6 @@ TSIG_KEY=/etc/hickory-dns/update.key
|
|||||||
RUN_USER=nobody
|
RUN_USER=nobody
|
||||||
RUN_GROUP=nogroup
|
RUN_GROUP=nogroup
|
||||||
|
|
||||||
STATE_DIR=/var/lib/hickory-dns
|
|
||||||
LAN_JOURNAL="${STATE_DIR}/lan.jrnl"
|
|
||||||
|
|
||||||
prepare_config_dir() {
|
prepare_config_dir() {
|
||||||
[ -d "$CONF_DIR" ] || mkdir -p "$CONF_DIR"
|
[ -d "$CONF_DIR" ] || mkdir -p "$CONF_DIR"
|
||||||
|
|
||||||
@@ -33,25 +30,9 @@ generate_tsig_key() {
|
|||||||
chmod 400 "$TSIG_KEY" 2>/dev/null || true
|
chmod 400 "$TSIG_KEY" 2>/dev/null || true
|
||||||
}
|
}
|
||||||
|
|
||||||
prepare_runtime_dirs() {
|
|
||||||
mkdir -p "$STATE_DIR"
|
|
||||||
|
|
||||||
chown "$RUN_USER:$RUN_GROUP" "$STATE_DIR" 2>/dev/null || true
|
|
||||||
chmod 755 "$STATE_DIR" 2>/dev/null || true
|
|
||||||
}
|
|
||||||
|
|
||||||
cleanup_stale_state() {
|
|
||||||
# Remove stale journal so hickory-dns always starts from the zone file.
|
|
||||||
# ipv6-neigh re-registers all dynamic entries on startup, so the journal
|
|
||||||
# has no durable value and may contain corrupt state after unclean shutdown.
|
|
||||||
rm -f "$LAN_JOURNAL"
|
|
||||||
}
|
|
||||||
|
|
||||||
start_service() {
|
start_service() {
|
||||||
prepare_config_dir
|
prepare_config_dir
|
||||||
generate_tsig_key
|
generate_tsig_key
|
||||||
prepare_runtime_dirs
|
|
||||||
cleanup_stale_state
|
|
||||||
|
|
||||||
procd_open_instance hickory-dns
|
procd_open_instance hickory-dns
|
||||||
procd_set_param command "$PROG" -c "$CONF" -q
|
procd_set_param command "$PROG" -c "$CONF" -q
|
||||||
|
|||||||
Reference in new issue
Block a user