Package: sec
Severity: wishlist

I wrote a startup script for sec. Not sure how to hook it into the rc.d system, 
but I used:

update-rc.d sec defaults

Maybe this could be put in the postinst. sec will fail gracefully if 
/etc/sec.conf does not exist. Maybe a sample 
(empty) file could be installed too. Here is a sample conf that restarts apache 
on crashes:

# recognize repeated crashes of apache and restart it after a certain threshold
#
# [Sun Mar 11 22:23:57 2007] [notice] child pid 23733 exit signal Segmentation 
fault (11)
type=SingleWithThreshold
ptype=RegExp
pattern=.*child pid \d+ exit signal Segmentation fault \(\d+\).*
desc=$0
action=shellcmd /etc/init.d/apache restart; shellcmd /bin/sh -c "echo 'apache 
restarted' | mail -s 'apache restarted' 
root"
window=10
thresh=3

it could be all commented out by default.

thanks for the package, sec is a great tool.

the rc.d script is attached.

-- System Information:
Debian Release: 4.0
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.20-1-686
Locale: LANG=fr_CA.UTF-8, LC_CTYPE=fr_CA.UTF-8 (charmap=UTF-8)

Attachment: sec
Description: application/shellscript

Reply via email to