diff options
author | Mark Felder <feld@FreeBSD.org> | 2014-05-22 13:17:34 +0000 |
---|---|---|
committer | Mark Felder <feld@FreeBSD.org> | 2014-05-22 13:17:34 +0000 |
commit | a58f460dfc2402985a95291fcd09f91d5b1ec492 (patch) | |
tree | 96b3fb74bc260c74a9a12bf7ee15e8e649e5016a /security/sshguard/pkg-deinstall | |
parent | 831d81bc332d70b3f8b1535cce5ebbbe1c111ca7 (diff) | |
download | ports-a58f460dfc2402985a95291fcd09f91d5b1ec492.tar.gz ports-a58f460dfc2402985a95291fcd09f91d5b1ec492.zip |
Notes
Diffstat (limited to 'security/sshguard/pkg-deinstall')
-rw-r--r-- | security/sshguard/pkg-deinstall | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/security/sshguard/pkg-deinstall b/security/sshguard/pkg-deinstall deleted file mode 100644 index ff6aa3c6f36a..000000000000 --- a/security/sshguard/pkg-deinstall +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh - -# If: -# 1) syslog.conf exists -# 2) it does contain some directive for sshguard -# then do the following: -# @ if the directive was the default directive (as installed by pkg-install) -# then remove it -# @ if the directive is some custom (uncommented) directive, comment it -# and reload syslogd eventually. - -# real syslog.conf configuration file path -SYSLOGCONF=/etc/syslog.conf -# configuration line to add -SSHGUARDCONFLINE="auth.info;authpriv.info |exec $PKG_PREFIX/sbin/sshguard" - -case "$2" in - "DEINSTALL") - if test -f "$SYSLOGCONF" && grep -q '^[^#].*sshguard' "$SYSLOGCONF" - then - if ! TMPFILE=`mktemp -q /tmp/syslogcXX`; then - echo "Couldn't create temporary file" - exit 1 - fi - if grep -qx "$SSHGUARDCONFLINE" "$SYSLOGCONF" - then - # remove default sshguard entry from syslog.conf - echo "I'm removing the default sshguard syslog entry for you..." - grep -vx "$SSHGUARDCONFLINE" "$SYSLOGCONF" > $TMPFILE - else - # comment customized sshguard configuration line - echo "I'm commenting your custom sshguard syslog entry for you..." - sed "s/^[^#].*sshguard.*/#&/" < "$SYSLOGCONF" > $TMPFILE - fi - mv $TMPFILE "$SYSLOGCONF" - /etc/rc.d/syslogd reload - fi - ;; -esac |