Hey all, I've been playing around with the psionic logsentry program and I made both src and binary rpm's to run on SuSE 7.2. What I'm wondering though is the best way to automate the execution of the program at certain times. What I've come up with is the following within rc.config # # psionic logsentry settings # # should logsentry be started? (yes/no) START_LOGCHECK="yes" # # at which intervals should logsentry be run? # ie: (hourly/daily/weekly/monthly) LOGCHECK_TIME="daily" I then created an execution script in each of the cron folders located in /etc, that check the variables within rc.config and execute according to the setting specified. In otherwords, if you told it hourly, then the script in cron.hourly would be the only one executed, if daily is chosen then only the crond.daily would be executed, etc.. #!/bin/sh # # # logcheck. This script will run psionic logcheck at specified time # based on variables set within rc.config. # # Copyright (c) 2001-2002 S.Toms <smotrs@mindspring.com> # # please send bugfixes or comments to smotrs@mindspring.com. # # Author: S.Toms <smotrs@mindspring.com>, 2001 # # # paranoia settings # umask 022 PATH=/sbin:/bin:/usr/sbin:/usr/bin export PATH # # get information from /etc/rc.config # if [ -f /etc/rc.config ] ; then . /etc/rc.config fi # # check to see if logcheck should be activated # test "$START_LOGCHECK" = yes || exit 0 test "$LOGCHECK_TIME" = daily || exit 0 LOGCHECK=/usr/sbin/logcheck.sh # # check that logcheck exists and execute # if [ -x "$LOGCHECK" ] ; then $LOGCHECK fi exit 0 What I'm wondering is, is there a better way, a nicer way, a more convenient way to do this that can be controlled fron rc.config? -- S.Toms - smotrs@mindspring.com - www.mindspring.com/~smotrs SuSE Linux v6.3 - Kernel 2.2.14 In Lexington, Kentucky, it's illegal to carry an ice cream cone in your pocket.
* S.Toms; <smotrs@mindspring.com> on 03 Feb, 2002 wrote:
Hey all, I've been playing around with the psionic logsentry program and I made both src and binary rpm's to run on SuSE 7.2. What I'm wondering though is the best way to automate the execution of the program at certain times. What I've come up with is the following within rc.config
Well src and binary rpms are good I had installed that via tar.gz and still do it that way. I still think the admin should adjust it to the needs as it can be a huge thing
What I'm wondering is, is there a better way, a nicer way, a more convenient way to do this that can be controlled fron rc.config?
Have a loot at seccheck which does the security checkings daily, weekly and monthly I am sure you will find lot's of hint at that package HTH -- Togan Muftuoglu Unofficial SuSE FAQ Maintainer http://dinamizm.ath.cx (currently fighting with the weird arp requests coming from the lan)
On Sun, 3 Feb 2002, Togan Muftuoglu wrote: tm> * S.Toms; <smotrs@mindspring.com> on 03 Feb, 2002 wrote: tm> > Hey all, I've been playing around with the psionic logsentry program and tm> >I made both src and binary rpm's to run on SuSE 7.2. What I'm wondering tm> >though is the best way to automate the execution of the program at certain tm> >times. What I've come up with is the following within rc.config tm> tm> Well src and binary rpms are good I had installed that via tar.gz and Same here, I installed it via the tar.gz but I created a spec file to do it all with. I do this not because I have to, but because I want to be familiar with the way RPM works, plus as a bonus, it gives an idea what the maintainers have to go through to make these RPM/SRPM packages. :) I look at something like this and say, "Ok, this took me this ammount of time to do, how long for something like XFree or KDE?". Then when I see questions pop up like, "Hey, I noticed XFree XX came out yesterday, how come the RPM's arn't available on SuSE's site yet?", I can just shake my head and laugh. tm> still do it that way. I still think the admin should adjust it to the tm> needs as it can be a huge thing tm> I agree, and the logcheck.sh file is still the main configuration of what you want monitored and where to put things. Mainly I was looking at it this way to make it easy for someone to start the thing without having to fuss with crontab. This would at least give someone for basic time frames for running and if they needed to fine tune it more then they could mess with crontab themselves :) tm> > tm> >What I'm wondering is, is there a better way, a nicer way, a more tm> >convenient way to do this that can be controlled fron rc.config? tm> tm> Have a loot at seccheck which does the security checkings daily, weekly tm> and monthly I am sure you will find lot's of hint at that package tm> Thank's, I'll take a look and see how they went about it. tm> tm> HTH tm> -- S.Toms - smotrs@mindspring.com - www.mindspring.com/~smotrs SuSE Linux v6.3 - Kernel 2.2.14 Let us live!!! Let us love!!! Let us share the deepest secrets of our souls!!! You first.
participants (2)
-
S.Toms
-
Togan Muftuoglu