forked from kongfl888/luci-app-adguardhome
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
executable file
·56 lines (47 loc) · 1.3 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# Copyright (C) 2018-2019 Lienol
#
# This is free software, licensed under the Apache License, Version 2.0 .
#
include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-adguardhome
PKG_VERSION:=1.8-20221120
PKG_RELEASE:=1
PKG_MAINTAINER:=<https://github.com/rufengsuixing/luci-app-adguardhome>
LUCI_TITLE:=LuCI app for adguardhome
LUCI_DEPENDS:=+!wget&&!curl&&!wget-ssl:curl
LUCI_PKGARCH:=all
LUCI_DESCRIPTION:=LuCI support for adguardhome
define Package/luci-app-adguardhome/conffiles
/usr/share/AdGuardHome/links.txt
/etc/config/AdGuardHome
endef
define Package/luci-app-adguardhome/postinst
#!/bin/sh
/etc/init.d/AdGuardHome enable >/dev/null 2>&1
enable=$(uci get AdGuardHome.AdGuardHome.enabled 2>/dev/null)
if [ "$enable" == "1" ]; then
/etc/init.d/AdGuardHome reload >/dev/null 2>&1
fi
rm -f /tmp/luci-indexcache
rm -f /tmp/luci-modulecache/*
exit 0
endef
define Package/luci-app-adguardhome/prerm
#!/bin/sh
if [ -z "$${IPKG_INSTROOT}" ]; then
/etc/init.d/AdGuardHome disable
/etc/init.d/AdGuardHome stop >/dev/null 2>&1
uci -q batch <<-EOF >/dev/null 2>&1
delete ucitrack.@AdGuardHome[-1]
commit ucitrack
EOF
fi
exit 0
endef
define Package/luci-app-adguardhome/postrm
#!/bin/sh
rm -rf /etc/AdGuardHome/
exit 0
endef
include $(TOPDIR)/feeds/luci/luci.mk
# call BuildPackage - OpenWrt buildroot signature