aboutsummaryrefslogtreecommitdiffstats
path: root/security/nessus-devel
diff options
context:
space:
mode:
authorsem <sem@FreeBSD.org>2004-12-13 05:37:53 +0800
committersem <sem@FreeBSD.org>2004-12-13 05:37:53 +0800
commit5b171b72dd4245b7e35c03e7e8bf24f311a60e54 (patch)
tree1e60c324bf54ec7a8f6481d28e04bb1b8f405ce6 /security/nessus-devel
parent9df8b78b9c5a8c17bbe305d3dc1d8dc577a4d4ab (diff)
downloadfreebsd-ports-gnome-5b171b72dd4245b7e35c03e7e8bf24f311a60e54.tar.gz
freebsd-ports-gnome-5b171b72dd4245b7e35c03e7e8bf24f311a60e54.tar.zst
freebsd-ports-gnome-5b171b72dd4245b7e35c03e7e8bf24f311a60e54.zip
- Remove extra files on deinstall
- While I'm here: make rm silent Submitted by: maintainer
Diffstat (limited to 'security/nessus-devel')
-rw-r--r--security/nessus-devel/pkg-plist5
-rw-r--r--security/nessus-devel/scripts/move_nessus10
2 files changed, 9 insertions, 6 deletions
diff --git a/security/nessus-devel/pkg-plist b/security/nessus-devel/pkg-plist
index f9c74d427f70..888c58c17474 100644
--- a/security/nessus-devel/pkg-plist
+++ b/security/nessus-devel/pkg-plist
@@ -2,8 +2,8 @@ bin/nessus
bin/nessus-fetch
bin/nessus-mkcert-client
bin/nessus-mkrand
-@unexec if cmp -s %D/etc/nessus/nessusd.conf.dist %D/etc/nessus/nessusd.conf; then rm -f %D/etc/nessus/nessusd.conf; fi
-@unexec if cmp -s %D/etc/nessus/nessusd.rules.dist %D/etc/nessus/nessusd.rules; then rm -f %D/etc/nessus/nessusd.rules; fi
+@unexec if cmp -s %D/etc/nessus/nessusd.conf.dist %D/etc/nessus/nessusd.conf; then rm -f %D/etc/nessus/nessusd.conf 2> /dev/null; fi || true
+@unexec if cmp -s %D/etc/nessus/nessusd.rules.dist %D/etc/nessus/nessusd.rules; then rm -f %D/etc/nessus/nessusd.rules 2> /dev/null; fi || true
etc/nessus/nessusd.conf.dist
etc/nessus/nessusd.rules.dist
@exec if [ ! -f %D/etc/nessus/nessusd.conf ]; then cp -p %D/etc/nessus/nessusd.conf.dist %D/etc/nessus/nessusd.conf; fi
@@ -26,6 +26,7 @@ sbin/nessusd
@exec mkdir -p %D/var/nessus/jobs
@exec mkdir -p %D/var/nessus/logs
@exec mkdir -p %D/var/nessus/users
+@unexec if [ ! -s %D/var/nessus/logs/nessusd.messages ]; then rm %D/var/nessus/logs/nessusd.messages 2> /dev/null; fi || true
@unexec rmdir %D/var/nessus/jobs 2>/dev/null || true
@unexec rmdir %D/var/nessus/logs 2>/dev/null || true
@unexec rmdir %D/var/nessus/users 2>/dev/null || true
diff --git a/security/nessus-devel/scripts/move_nessus b/security/nessus-devel/scripts/move_nessus
index 32b3b8b872d6..44dd18c6cc88 100644
--- a/security/nessus-devel/scripts/move_nessus
+++ b/security/nessus-devel/scripts/move_nessus
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $FreeBSD: /tmp/pcvs/ports/security/nessus-devel/scripts/Attic/move_nessus,v 1.2 2004-08-13 14:15:25 vs Exp $
+# $FreeBSD: /tmp/pcvs/ports/security/nessus-devel/scripts/Attic/move_nessus,v 1.3 2004-12-12 21:37:53 sem Exp $
#
# set -x
@@ -19,10 +19,12 @@ PATH=/bin:/usr/bin
if [ -f $PREFIX/etc/nessus/nessusd.conf ]; then
- mv $PREFIX/etc/nessus/nessusd.conf $PREFIX/etc/nessus/nessusd.conf.bak
- sed -e "s,/usr/local/etc/nessus/var,/usr/local/var,g" \
- -e "s,/usr/local/etc/nessus/com,/usr/local/com,g" \
+ if grep -q "$PREFIX/etc/nessus/var" $PREFIX/etc/nessus/nessusd.conf; then
+ mv $PREFIX/etc/nessus/nessusd.conf $PREFIX/etc/nessus/nessusd.conf.bak
+ sed -e "s,$PREFIX/etc/nessus/var,$PREFIX/var,g" \
+ -e "s,$PREFIX/etc/nessus/com,$PREFIX/com,g" \
$PREFIX/etc/nessus/nessusd.conf.bak > $PREFIX/etc/nessus/nessusd.conf
+ fi
fi
if [ -d $PREFIX/etc/nessus/var/nessus/users ]; then
rmdir $PREFIX/etc/nessus/var/nessus/users > /dev/null 2>/dev/null