aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan McCrohan <jmccrohan@gmail.com>2012-03-12 00:24:16 +0000
committerJonathan McCrohan <jmccrohan@gmail.com>2012-03-12 00:27:02 +0000
commit41cbae4f42418572fd5a12caa162d19da14e146b (patch)
tree0bad4b1659e1d800e1ff70a5ca0e431e055897e8
parent069af04a4ae3d48228cd0a03e768425cb534680e (diff)
downloadverteco-41cbae4f42418572fd5a12caa162d19da14e146b.tar.gz
Add cron.d entry
Diffstat (limited to '')
-rw-r--r--Makefile3
-rw-r--r--cron/modbuslog6
2 files changed, 9 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index d2accc5..fbf0267 100644
--- a/Makefile
+++ b/Makefile
@@ -1,11 +1,13 @@
CC=gcc
SDIR=src
+CRONDIR=cron
INSTALL=/usr/bin/install -c
MODBUSLOGCFLAGS=-I/usr/include/modbus
MODBUSLOGLIBS=-lmodbus -lconfig
MODBUSLOGBINDIR=/usr/sbin
MODBUSLOGCFGDIR=/etc
MODBUSLOGLOGDIR=/var/modbuslog
+MODBUSLOGCRONDIR=/etc/cron.d
FTPHELPERCFLAGS=
FTPHELPERLIBS=-lconfig
FTPHELPERDIR=/usr/bin
@@ -34,6 +36,7 @@ install: all
mkdir $(MODBUSLOGLOGDIR)/archive; \
fi
test -f $(MODBUSLOGLOGDIR)/interval/interval.txt || $(INSTALL) -m 644 $(SDIR)/interval.txt $(MODBUSLOGLOGDIR)/interval/interval.txt
+ test -f $(MODBUSLOGCRONDIR)/modbuslog || $(INSTALL) -m 644 $(CRONDIR)/modbuslog $(MODBUSLOGCRONDIR)/modbuslog
$(INSTALL) $(SDIR)/ftpupload $(FTPHELPERDIR)/ftpupload
$(INSTALL) $(SDIR)/ftphelper $(FTPHELPERDIR)/ftphelper
$(INSTALL) $(PHPSDIR)/readfile.php $(WWWDIR)/readfile.php
diff --git a/cron/modbuslog b/cron/modbuslog
new file mode 100644
index 0000000..58abb29
--- /dev/null
+++ b/cron/modbuslog
@@ -0,0 +1,6 @@
+SHELL=/bin/sh
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+
+# m h dom mon dow user command
+@reboot root /usr/sbin/modbuslog
+10 0 * * * root /usr/bin/ftpupload