LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-04-2008, 12:12 PM   #1
Shwick
Member
 
Registered: Jun 2008
Posts: 111

Rep: Reputation: 15
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?
 
Old 10-05-2008, 07:50 AM   #2
watcher69b
Member
 
Registered: Nov 2007
Location: /home/watcher69b
Distribution: RH, Fedora & CentOS
Posts: 552

Rep: Reputation: 41
I have never useded it myself but usually cron is your best bet.
 
Old 10-05-2008, 04:42 PM   #3
Shwick
Member
 
Registered: Jun 2008
Posts: 111

Original Poster
Rep: Reputation: 15
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
 
Old 10-05-2008, 10:04 PM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 7.7 (?), Centos 8.1
Posts: 17,817

Rep: Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553
Sounds odd, but if you're sure about that, why not let it write a tmp file somewhere, then grep the file?
 
Old 10-07-2008, 10:35 PM   #5
Shwick
Member
 
Registered: Jun 2008
Posts: 111

Original Poster
Rep: Reputation: 15
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?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Schedule Tasks Using Gnome-schedule (cron & at GUI) LXer Syndicated Linux News 0 07-28-2007 01:31 AM
Schedule padideh Linux - Server 4 10-22-2006 09:15 AM
tripwire reports /usr/sbin/tripwire changed alfaalfabeta Linux - Security 5 07-22-2003 06:52 PM
Schedule, AGAIN!! erathomor Linux - General 0 04-11-2002 12:25 PM
HOW TO Schedule erathomor Linux - General 3 04-10-2002 02:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:54 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration