# # Copyright (C) 2026 xiexiaobao # # This is free software, licensed under the GPL 2.0 license. # include $(TOPDIR)/rules.mk PKG_NAME:=maple-restore PKG_VERSION:=1.0 PKG_RELEASE:=1 PKG_MAINTAINER:=xiexiaobao PKG_LICENSE:=GPL-2.0 include $(INCLUDE_DIR)/package.mk define Package/maple-restore SECTION:=utils CATEGORY:=Utilities TITLE:=Auto-restore configs from p4 after MapleOS sysupgrade PKGARCH:=all DEPENDS:= endef define Package/maple-restore/description UCI defaults script that auto-restores backed-up configs from /mnt/mmc2-4/.maple-backup/ on first boot after a maple-upgrade. Restores: shadow, frpc, openclash, firewall, network, dhcp, fstab, dropbear, luci, system, uhttpd, transmission, aria2, tinyproxy, tailscale, dockerd, crontab, and more. Runs exactly once via uci-defaults, then self-deletes. endef define Build/Configure endef define Build/Compile endef define Package/maple-restore/install $(INSTALL_DIR) $(1)/etc/uci-defaults $(INSTALL_BIN) ./files/99-maple-restore.sh $(1)/etc/uci-defaults/99-maple-restore endef $(eval $(call BuildPackage,maple-restore))