this scripte cut lthe line expired in file var/etc/expired
## ##
grep $(date +%d-%m-%Y) /var/teste.cfg >> /var/expired
echo "sed -i '/$(date +%d-%m-%Y)/d' /var/teste.cfg" > /tmp/check-expire
chmod 755 /tmp/check-expire
/tmp/check-expire
rm /tmp/check-expire
can you add # befor the line F: in the my file : teste.cfg
---------- Post updated at 06:39 PM ---------- Previous update was at 06:37 PM ----------
bash shell
---------- Post updated at 06:43 PM ---------- Previous update was at 06:39 PM ----------
CCcam expire Date script
Put script file on
Code:
/bin/expiry
Code:
chmod 755 /bin/expiry
example of F Line on CCcam.cfg
Code:
F: user pass 0 1 0 { 0:0:1 } # 08-04-2012
cron job to check expire dates once daily
Code:
crontab -e
Code:
00 00 * * * /bin/expiry
finally when you will find expired lines on
Code:
/var/etc/expired
---------- Post updated at 06:57 PM ---------- Previous update was at 06:43 PM ----------
it's work
but the file is in /temp
thank's for all
but if i add after the date other information
exmp : #F: net350 1456564024 1 0 0 { 0:0:1 } # 26-2-2012 ; teste
it work or not