if the file changes send email about diff

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




I have 2 script. Script "A", Script "B".

Script "A" is regulary watching the "dhcpacks" [dhcp release is configured to 2mins] in the logs, for the past 2 minutes. it writes the MAC addresses to a file [/dev/shm/dhcpacks-in-last-2min.txt] every 2 minutes. Ok, this is working, active clients are in this file. Super!

Script "B": http://pastebin.com/raw.php?i=wvhwhPWu
I'm trying to create a script, that watches the changes in "/dev/shm/dhcpacks-in-last-2min.txt" file [in every 1 sec]. Ok. But: my "watcher" script [the pastebined] is not working fine...sometime it works, sometime it send that someone "XY logged out", but it's not true! nothing happened, and the problem is not in the Script "A".

Can someone help me point out, what am i missing? How can i watch a file [in every sec], that contains only MAC addresses, and if someone doesn't get dhcpack in 2 minutes, the file "/dev/shm/dhcpacks-in-last-2min.txt" changes, and that clients MAC address will be gone from it, and i need to know, who was it [pastebined my script..but somethings wrong with it].

Thank you for any help..i've been pathing my script for days now.. :\

-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux