summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkrebs <krebs@fuerkrebs>2011-11-04 12:40:09 -0400
committerkrebs <krebs@fuerkrebs>2011-11-04 12:40:09 -0400
commitc74c87e070eadac2acede8a416e7a0df90beb2df (patch)
tree47989fedfa4c92f0bf03c3efe5afadc57e4e16ad
parent29b328140d294d9f688f562f1da5115fe2d57d4c (diff)
//census: add scheduler, update Makefile
sched-arping schedules the arping script call by utilizing the //util/bin/magic functionality
-rw-r--r--census/Makefile3
-rwxr-xr-xcensus/sched-arping8
2 files changed, 9 insertions, 2 deletions
diff --git a/census/Makefile b/census/Makefile
index 2c6c1c03..9993bf2a 100644
--- a/census/Makefile
+++ b/census/Makefile
@@ -1,6 +1,5 @@
.phony: all
all: arping.py arping_users.py
- echo "call python ./arping_users.py v"
install:
- apt-get install python-scapy
+ ./sched-arping
diff --git a/census/sched-arping b/census/sched-arping
new file mode 100755
index 00000000..d281cac3
--- /dev/null
+++ b/census/sched-arping
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+TMP=`mktemp`
+crontab -l >$TMP
+
+echo "23 * * * * $PWD/arping_users.py > $PWD/../db/arping" |
+../util/bin/magic "arping" create $TMP
+crontab $TMP