aboutsummaryrefslogtreecommitdiff
path: root/utils/watchcat
diff options
context:
space:
mode:
authorRoger <rogerdammit@gmail.com>2014-08-14 09:30:25 -0500
committerRoger <rogerdammit@gmail.com>2014-08-14 09:30:25 -0500
commitd1d33eedaf7cfeb883ae37690385e15d9bcfb016 (patch)
tree388e031c345c289ccd8b97d5145778a09db93c7c /utils/watchcat
parentf749bd72375d33932b9381d35e6446b18430e484 (diff)
add license
Signed-off-by: Roger D rogerdammit@gmail.com
Diffstat (limited to 'utils/watchcat')
-rw-r--r--utils/watchcat/Makefile1
-rw-r--r--utils/watchcat/files/watchcat.sh13
2 files changed, 10 insertions, 4 deletions
diff --git a/utils/watchcat/Makefile b/utils/watchcat/Makefile
index 03d4ed983..745979442 100644
--- a/utils/watchcat/Makefile
+++ b/utils/watchcat/Makefile
@@ -12,6 +12,7 @@ PKG_VERSION:=1
PKG_RELEASE:=5
PKG_MAINTAINER:=Roger D <rogerdammit@gmail.com>
+PKG_LICENSE:=GPL-2.0
include $(INCLUDE_DIR)/package.mk
diff --git a/utils/watchcat/files/watchcat.sh b/utils/watchcat/files/watchcat.sh
index ee9b6bdfa..304ef27c1 100644
--- a/utils/watchcat/files/watchcat.sh
+++ b/utils/watchcat/files/watchcat.sh
@@ -1,4 +1,9 @@
-#!/bin/sh
+#!/bin/sh
+#
+# Copyright (C) 2010 segal.di.ubi.pt
+#
+# This is free software, licensed under the GNU General Public License v2.
+#
mode="$1"
@@ -46,12 +51,12 @@ watchcat_ping() {
for host in "$pinghosts"
do
- if ping -c 1 "$host" &> /dev/null
- then
+ if ping -c 1 "$host" &> /dev/null
+ then
time_lastcheck_withinternet="$time_now"
else
time_diff="$((time_now-time_lastcheck_withinternet))"
- logger -p daemon.info -t "watchcat[$$]" "no internet connectivity for $time_diff seconds. Reseting when reaching $period"
+ logger -p daemon.info -t "watchcat[$$]" "no internet connectivity for $time_diff seconds. Reseting when reaching $period"
fi
done