mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-27 10:03:20 +00:00
- Add periodic script to ease the maintenance
- Bump PORTREVISION PR: 102968 Submitted by: Gabor Kovesdan <gabor@FreeBSD.org>
This commit is contained in:
parent
70685cc86f
commit
62d5116f7d
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=172710
@ -7,7 +7,7 @@
|
||||
|
||||
PORTNAME= rkhunter
|
||||
PORTVERSION= 1.2.8
|
||||
PORTREVISION= 2
|
||||
PORTREVISION= 3
|
||||
CATEGORIES= security
|
||||
MASTER_SITES= http://downloads.rootkit.nl/
|
||||
|
||||
@ -23,6 +23,7 @@ RUN_DEPENDS+= ${SITE_PERL}/${PERL_ARCH}/Digest/SHA1.pm:${PORTSDIR}/security/p5-D
|
||||
WRKSRC= ${WRKDIR}/${PORTNAME}
|
||||
USE_PERL5= yes
|
||||
NO_BUILD= yes
|
||||
SUB_FILES= 415.rkhunter
|
||||
|
||||
MAN8= rkhunter.8
|
||||
MANCOMPRESSED= no
|
||||
@ -42,12 +43,14 @@ RUN_DEPENDS+= nmap:${PORTSDIR}/security/nmap
|
||||
do-install:
|
||||
cd ${WRKSRC} && ./installer.sh --installdir ${PREFIX}
|
||||
${INSTALL_MAN} ${WRKSRC}/files/development/rkhunter.8 ${MAN8PREFIX}/man/man8
|
||||
@${MKDIR} ${PREFIX}/etc/periodic/security
|
||||
${INSTALL_SCRIPT} ${WRKDIR}/415.rkhunter ${PREFIX}/etc/periodic/security
|
||||
.if !defined(NOPORTDOCS)
|
||||
@${MKDIR} ${DOCSDIR}
|
||||
${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/files/|} ${DOCSDIR}
|
||||
.endif
|
||||
|
||||
post-install:
|
||||
@${CAT} ${PKGMESSAGE}
|
||||
@${CAT} ${PKGMESSAGE}
|
||||
|
||||
.include <bsd.port.post.mk>
|
||||
|
33
security/rkhunter/files/415.rkhunter.in
Normal file
33
security/rkhunter/files/415.rkhunter.in
Normal file
@ -0,0 +1,33 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
# This is a maintenance shell script for the rkhunter security tool.
|
||||
# You can enable this script in /etc/periodic.conf file by putting these lines into it:
|
||||
# daily_rkhunter_update_enable="YES"
|
||||
# daily_rkhunter_check_enable="YES"
|
||||
#
|
||||
# Written by: Gabor Kovesdan <gabor@FreeBSD.org>
|
||||
|
||||
if [ -r /etc/defaults/periodic.conf ]; then
|
||||
. /etc/defaults/periodic.conf
|
||||
source_periodic_confs
|
||||
fi
|
||||
|
||||
case "$daily_rkhunter_update_enable" in
|
||||
[Yy][Ee][Ss])
|
||||
|
||||
echo ""
|
||||
echo "Updating the rkhunter database..."
|
||||
%%PREFIX%%/bin/rkhunter --update
|
||||
;;
|
||||
esac
|
||||
|
||||
case "$daily_rkhunter_check_enable" in
|
||||
[Yy][Ee][Ss])
|
||||
|
||||
echo ""
|
||||
echo "Running rkhunter..."
|
||||
%%PREFIX%%/bin/rkhunter --checkall --cronjob --skip-keypress
|
||||
;;
|
||||
esac
|
@ -1,8 +1,14 @@
|
||||
|
||||
**********************************************
|
||||
NOTICE:
|
||||
******************************************************************************
|
||||
|
||||
Keep your database up-to-date by running
|
||||
"rkhunter --update" frequently.
|
||||
You should keep your rkhunter database up-to-date.
|
||||
This can be done automatically by putting this line to /etc/periodic.conf:
|
||||
|
||||
**********************************************
|
||||
daily_rkhunter_update_enable="YES"
|
||||
|
||||
Also, you can run rkhunter as a part of the daily security check by
|
||||
putting this line to /etc/periodic.conf:
|
||||
|
||||
daily_rkhunter_check_enable="YES"
|
||||
|
||||
******************************************************************************
|
||||
|
@ -1,6 +1,7 @@
|
||||
bin/rkhunter
|
||||
@unexec if cmp -s %D/etc/rkhunter.conf %D/etc/rkhunter.conf.sample; then rm -f %D/etc/rkhunter.conf; fi
|
||||
etc/rkhunter.conf.sample
|
||||
etc/periodic/security/415.rkhunter
|
||||
lib/rkhunter/db/backdoorports.dat
|
||||
lib/rkhunter/db/defaulthashes.dat
|
||||
lib/rkhunter/db/md5blacklist.dat
|
||||
@ -17,3 +18,5 @@ lib/rkhunter/scripts/showfiles.pl
|
||||
@dirrm lib/rkhunter/scripts
|
||||
@dirrm lib/rkhunter/db
|
||||
@dirrm lib/rkhunter
|
||||
@dirrmtry etc/periodic/security
|
||||
@dirrmtry etc/periodic
|
||||
|
Loading…
Reference in New Issue
Block a user