Best way schedule tripwire
Ubuntu 8.04
Does tripwire have a config file that can schedule integrity checks, or do I have to do it from a cron job? |
I have never useded it myself but usually cron is your best bet.
|
I built this off of the tripwire daily cron script. I'm trying to check the number of violations.
There's a problem when $tripResult is instantiated with the tripwire report- it doesn't have any newline characters. This causes grep to not get the line with the number of violations, it just gets the entire report. #!/bin/sh -e tripwire=/usr/sbin/tripwire [ -x $tripwire ] || exit 0 umask 027 tripResult=$($tripwire --check --quiet) tripViolations=$(echo $tripResult | grep "Total violations found" | awk '{print $4}') exit 0 |
Sounds odd, but if you're sure about that, why not let it write a tmp file somewhere, then grep the file?
|
I could issue tripwire --check twice(bad), I could write the results to a file then read it twice(ok...), but is there some option that will keep redundant white space in the shell variable?
|
All times are GMT -5. The time now is 02:30 PM. |