2 # Copyright (C) 2015 Bruno Randolf (br1@einfach.org)
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
11 PKG_VERSION
:=2020-02-12
14 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.xz
15 PKG_MIRROR_HASH
:=3890cd39add7e523ab7418faf6a7ae1a1f71d2739982e6e09aa33cc6defac8be
16 PKG_SOURCE_SUBDIR
:=$(PKG_NAME
)-$(PKG_VERSION
)
17 PKG_SOURCE_URL
:=https
://github.com
/br101
/pingcheck
19 PKG_SOURCE_VERSION
:=520718f9377eab49888a3e38ece59f9ad94d978e
21 PKG_MAINTAINER
:=Bruno Randolf
<br1@einfach.org
>
22 PKG_LICENSE
:=GPL-2.0
-or-later
23 PKG_LICENSE_FILES
:=LICENSE
27 include $(INCLUDE_DIR
)/package.mk
29 define Package
/pingcheck
32 DEPENDS
:=+libubus
+libuci
33 MAINTAINER
:=Bruno Randolf
<br1@einfach.org
>
34 TITLE
:=Check Internet and interface connectivity
35 URL
:=https
://github.com
/br101
/pingcheck
38 define Package
/pingcheck
/description
39 Checks by using
"ping" (ICMP echo
) or by opening connections to TCP port
80
40 whether a configured host
(normally on the internet
) can be reached via a
41 specific interface. Then makes this information available via ubus and triggers
42 "online" and
"offline" scripts.
45 define Package
/pingcheck
/conffiles
49 define Package
/pingcheck
/install
50 $(INSTALL_DIR
) $(1)/usr
/sbin
51 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/build
/pingcheck
$(1)/usr
/sbin
/
52 $(INSTALL_DIR
) $(1)/etc
/init.d
53 $(INSTALL_BIN
) .
/pingcheck.init
$(1)/etc
/init.d
/pingcheck
54 $(INSTALL_DIR
) $(1)/etc
/config
55 $(INSTALL_DATA
) $(PKG_BUILD_DIR
)/pingcheck.config
$(1)/etc
/config
/pingcheck
56 $(INSTALL_DIR
) $(1)/etc
/pingcheck
/online.d
/
57 $(INSTALL_DIR
) $(1)/etc
/pingcheck
/offline.d
/
58 $(INSTALL_DIR
) $(1)/etc
/pingcheck
/panic.d
/
59 $(INSTALL_DATA
) $(PKG_BUILD_DIR
)/example-script.sh
$(1)/etc
/pingcheck
/online.d
/
60 $(INSTALL_DATA
) $(PKG_BUILD_DIR
)/example-script.sh
$(1)/etc
/pingcheck
/offline.d
/
63 $(eval
$(call BuildPackage
,pingcheck
))