diff options
author | sem <sem@FreeBSD.org> | 2004-12-13 05:37:53 +0800 |
---|---|---|
committer | sem <sem@FreeBSD.org> | 2004-12-13 05:37:53 +0800 |
commit | 5b171b72dd4245b7e35c03e7e8bf24f311a60e54 (patch) | |
tree | 1e60c324bf54ec7a8f6481d28e04bb1b8f405ce6 /security/nessus/scripts | |
parent | 9df8b78b9c5a8c17bbe305d3dc1d8dc577a4d4ab (diff) | |
download | freebsd-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/scripts')
-rw-r--r-- | security/nessus/scripts/move_nessus | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/security/nessus/scripts/move_nessus b/security/nessus/scripts/move_nessus index 7c5d16e4efac..0ed0367a1e72 100644 --- a/security/nessus/scripts/move_nessus +++ b/security/nessus/scripts/move_nessus @@ -1,6 +1,6 @@ #!/bin/sh # -# $FreeBSD: /tmp/pcvs/ports/security/nessus/scripts/move_nessus,v 1.2 2004-08-13 13:36:02 vs Exp $ +# $FreeBSD: /tmp/pcvs/ports/security/nessus/scripts/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 |