aboutsummaryrefslogtreecommitdiffstats
path: root/lib/libdvbcfg/Makefile
blob: 5e5e36566c7406d4ec2c6b26045ef2ace8a9128e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# Makefile for linuxtv.org dvb-apps/lib/libdvbcfg

includes = dvbcfg_zapchannel.h \
	   dvbcfg_scanfile.h

objects  = dvbcfg_zapchannel.o \
	   dvbcfg_scanfile.o \
	   dvbcfg_common.o

lib_name = libdvbcfg

CPPFLAGS += -I../../lib

.PHONY: all

all: library

include ../../Make.rules
lass="s1">'0 days ago'`"_00_00_00.log" # upload previous 6 days for redundancy TWODAYLOG=`/usr/bin/ftphelper --mac`"_"`date +%Y_%m_%d --date='1 days ago'`"_00_00_00.log" THREEDAYLOG=`/usr/bin/ftphelper --mac`"_"`date +%Y_%m_%d --date='2 days ago'`"_00_00_00.log" FOURDAYLOG=`/usr/bin/ftphelper --mac`"_"`date +%Y_%m_%d --date='3 days ago'`"_00_00_00.log" FIVEDAYLOG=`/usr/bin/ftphelper --mac`"_"`date +%Y_%m_%d --date='4 days ago'`"_00_00_00.log" SIXDAYLOG=`/usr/bin/ftphelper --mac`"_"`date +%Y_%m_%d --date='5 days ago'`"_00_00_00.log" SEVENDAYLOG=`/usr/bin/ftphelper --mac`"_"`date +%Y_%m_%d --date='6 days ago'`"_00_00_00.log" # move file to archive mv $CURRENTLOG /var/modbuslog/archive/ # mput is dumb, and if we don't cd to the directory, # it will try to save file to /var/modbuslog/MAC.....log on ftp remote cd /var/modbuslog/archive/ # login to remote server and upload ftp -n -v -i $SERVER <<EOF user $USERNAME $PASSWORD cd $REMOTEDIRECTORY mput $CURRENTLOG mput $TWODAYLOG mput $THREEDAYLOG mput $FOURDAYLOG mput $FIVEDAYLOG mput $SIXDAYLOG mput $SEVENDAYLOG bye EOF # remove files after 3 months CLEANUP="/var/modbus/archive/"`/usr/bin/ftphelper --mac`"_"`date +%Y_%m --date='4 months ago'`"*.log" rm $CLEANUP