telot Posted May 28, 2012 Share Posted May 28, 2012 Anyone here use the cron on the pineapple? I can't seem to get it to work. Heres my crontab entry from the 'Jobs' gui: */5 * * * * /www/pineapple/scripts/cleanup.sh */5 * * * * /www/pineapple/ssh/ssh-keepalive.sh */5 * * * * /usb/pinesave/telotreport.sh Inside /usb/pinesave/telotreport.sh: #!/bin/bash TODAY=$(date +"%m-%d-%y") rm /usb/emailreport.log du -h /usb/cap.$TODAY.pcap > /usb/emailreport.log cat /www/pineapple/logs/associations.log >> /usb/emailreport.log cat /www/pineapple/logs/urlsnarf.log >> /usb/emailreport.log ./usb/killurlsnarf.sh ./usb/starturlsnarf.sh cat /www/pineapple/logs/dnsspoof.log >> /usb/emailreport.log cat /proc/net/arp >> /usb/emailreport.log cat /tmp/dhcp.leases; echo '\n'; cat /proc/net/arp; echo '\n'; grep KARMA /tmp/karma.log | grep -v -e enabled | grep -v -e malloc | grep -v -e CTRL_IFACE | grep -v -e KARMA_STATE | grep -v -e Request >> /us$ ssmtp -v firstname.lastname@example.org < /usb/emailreport.log I know, I know, its a very rough draft of my email reports module I'll make someday. So as you can see, I remove the old log, take a size reading on today's capture file, cat the urlsnarf.log and restart it, then cat a bunch of other things and email it off. Just running the script works great - I get the email and its got all the goodies in it. I was hoping to get this to be sent to me every hour or two, but wanted to test it on 5 minute intervals. Most unfortunately I don't ever receive any emails. So I ran a test - I put a script in /www/pineapple/scripts/ called test.sh - in it is simply: #!/bin/sh touch /www/testthis I added it to the cron (again, on the Jobs page) for 5 minute intervals - now it looks like this: */5 * * * * /www/pineapple/scripts/cleanup.sh */5 * * * * /www/pineapple/ssh/ssh-keepalive.sh */5 * * * * /www/pineapple/scripts/test.sh Came back 6 minutes later and ls /www/ and testthis is there. So what is stopping telotreport.sh from working? They're both chmod +x'd - same permissions as the cleanup.sh script. Any advice would be greatly appreciated. Thanks guys telot Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.