summaryrefslogtreecommitdiff
path: root/community/sshguard
diff options
context:
space:
mode:
authorMichał Masłowski <mtjm@mtjm.eu>2013-05-16 16:49:47 +0200
committerMichał Masłowski <mtjm@mtjm.eu>2013-05-16 16:49:47 +0200
commitbc864260b40f40e8f689788c54f6138007764077 (patch)
tree9c9be0d9a53d7e3a03d76276fc4b02dd08b552bf /community/sshguard
parentb90f83b99150003a2022c3a4bbad90b12eb56b7e (diff)
parent453f3b8b2c568e9babcdc4852772278a39f130c0 (diff)
Merge branch 'master' of ssh://parabolagnulinux.org:1863/home/parabola/abslibre-pre-mips64el
Conflicts: community/bird/PKGBUILD community/drbd/PKGBUILD community/etherape/PKGBUILD community/ext4magic/PKGBUILD community/fcron/PKGBUILD community/fcron/systab.orig community/gnome-panel/PKGBUILD community/libident/PKGBUILD community/libtorrent/PKGBUILD community/linux-tools/PKGBUILD community/linux-tools/usbipd.service community/makedev/PKGBUILD community/minbif/PKGBUILD community/noip/PKGBUILD community/notmuch/PKGBUILD community/pam_pwcheck/PKGBUILD community/pound/PKGBUILD community/preload/PKGBUILD community/python-cchardet/PKGBUILD community/rtorrent/PKGBUILD community/tor/PKGBUILD community/ude/PKGBUILD core/openldap/PKGBUILD core/sysvinit/PKGBUILD extra/cd-discid/PKGBUILD extra/cvs/PKGBUILD extra/epiphany-extensions/PKGBUILD extra/fbset/PKGBUILD extra/fluidsynth/PKGBUILD extra/gtkmm/PKGBUILD extra/gvfs/PKGBUILD extra/kdepim/PKGBUILD extra/libical/PKGBUILD extra/mutt/PKGBUILD extra/netkit-bsd-finger/PKGBUILD extra/ossp/PKGBUILD extra/php/PKGBUILD extra/pidgin/PKGBUILD extra/rtkit/PKGBUILD extra/samba/PKGBUILD extra/totem/PKGBUILD extra/webkitgtk/PKGBUILD libre/liferea-libre/PKGBUILD libre/mplayer-vaapi-libre/PKGBUILD
Diffstat (limited to 'community/sshguard')
-rw-r--r--community/sshguard/PKGBUILD18
-rw-r--r--community/sshguard/sshguard-journalctl2
-rw-r--r--community/sshguard/sshguard.conf.d4
-rw-r--r--community/sshguard/sshguard.install14
-rw-r--r--community/sshguard/sshguard.rc27
-rw-r--r--community/sshguard/sshguard.service4
6 files changed, 19 insertions, 50 deletions
diff --git a/community/sshguard/PKGBUILD b/community/sshguard/PKGBUILD
index e786ec243..1ac28a1f3 100644
--- a/community/sshguard/PKGBUILD
+++ b/community/sshguard/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 84143 2013-02-11 15:20:18Z spupykin $
+# $Id: PKGBUILD 90628 2013-05-13 12:25:45Z mtorromeo $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Maintainer: Massimiliano Torromeo <massimiliano.torromeo@gmail.com>
pkgname=sshguard
pkgver=1.5
-pkgrel=10
+pkgrel=12
pkgdesc="Brute force detector for SSH, Exim, VSFTPD and more. Blocks by ip with iptables"
arch=('i686' 'x86_64' 'mips64el')
#url="http://sourceforge.net/projects/sshguard/"
@@ -14,20 +14,16 @@ depends=('iptables')
options=(zipman)
install=sshguard.install
source=("http://downloads.sourceforge.net/sourceforge/sshguard/sshguard-$pkgver.tar.bz2"
- sshguard.rc
- sshguard.conf.d
sshguard.service
sshguard-journalctl)
sha256sums=('b537f8765455fdf8424f87d4bd695e5b675b88e5d164865452137947093e7e19'
- 'a810da878e40be8616a93c9984e7dbd3700367d665b78b8aa2498228bb33cb6e'
- '66f28e2cc81e5686f8fd5c0d5a5015d7feecbe018a259f4032cfbacf6fe8d1c3'
- '2b2a3c1140349296c3629e77f74c3b29f4ef2ce5f77cb3a811cbed5b46d23028'
- '9491c4cd23d789dd04af551e16dc123f1517ca02ad3539f25715bbeec70ee21e')
+ 'e9713a067b33b8ea91d203853a033c0b9f6d40ebebd77f2e72903ed4fd355ebd'
+ '7423224107b28cabb69489056968581f1c9e94f3edc6a1d189e56a9df0bab4f7')
build() {
cd "$srcdir/$pkgname-$pkgver"
sed -i 's|^DAYNO.*|DAYNO [0-9]?[1-9]|' src/parser/attack_scanner.l
- ./configure --prefix=/usr --with-firewall=iptables
+ ./configure --prefix=/usr --sbindir=/usr/bin --with-firewall=iptables
make
}
@@ -38,9 +34,7 @@ check() {
package() {
cd "$srcdir/$pkgname-$pkgver"
- make prefix="$pkgdir/usr" install
+ make DESTDIR="$pkgdir" install
install -Dm0644 "$srcdir/sshguard.service" "$pkgdir/usr/lib/systemd/system/sshguard.service"
- install -Dm0755 "$srcdir/sshguard.rc" "$pkgdir/etc/rc.d/sshguard"
- install -Dm0644 "$srcdir/sshguard.conf.d" "$pkgdir/etc/conf.d/sshguard"
install -Dm0755 "$srcdir/sshguard-journalctl" "$pkgdir/usr/lib/systemd/scripts/sshguard-journalctl"
}
diff --git a/community/sshguard/sshguard-journalctl b/community/sshguard/sshguard-journalctl
index 13afd6f33..fb106f5b6 100644
--- a/community/sshguard/sshguard-journalctl
+++ b/community/sshguard/sshguard-journalctl
@@ -1,2 +1,2 @@
#!/bin/sh
-/usr/bin/journalctl -afbp info -n1 SYSLOG_FACILITY=4 SYSLOG_FACILITY=10 | /usr/sbin/sshguard -l- "$@"
+/usr/bin/journalctl -afbp info -n1 SYSLOG_FACILITY=4 SYSLOG_FACILITY=10 | /usr/bin/sshguard -l- "$@"
diff --git a/community/sshguard/sshguard.conf.d b/community/sshguard/sshguard.conf.d
deleted file mode 100644
index 8fa351a19..000000000
--- a/community/sshguard/sshguard.conf.d
+++ /dev/null
@@ -1,4 +0,0 @@
-#
-# Arguments to be passed to sshguard
-#
-SSHGUARD_ARGS=""
diff --git a/community/sshguard/sshguard.install b/community/sshguard/sshguard.install
index 0821c61e0..486e55fbd 100644
--- a/community/sshguard/sshguard.install
+++ b/community/sshguard/sshguard.install
@@ -1,8 +1,14 @@
post_install() {
- mkdir -p /var/db/sshguard
- echo "-- You should add chain to your firewall:"
+ mkdir -p var/db/sshguard
+ echo "-- You should add chains to your firewall:"
echo "-- iptables -N sshguard"
echo "-- iptables -A INPUT -p tcp --dport 22 -j sshguard"
- echo "-- For more information, see http://www.sshguard.net/doc/"
- /bin/true
+ echo "-- ip6tables -N sshguard"
+ echo "-- ip6tables -A INPUT -p tcp --dport 22 -j sshguard"
+ echo "-- touch /etc/iptables/ip6tables.rules if you don't use IPv6"
+ echo "-- For more information, see https://wiki.archlinux.org/index.php/Sshguard"
+}
+
+post_upgrade() {
+ echo "-- touch /etc/iptables/ip6tables.rules if you don't use IPv6"
}
diff --git a/community/sshguard/sshguard.rc b/community/sshguard/sshguard.rc
deleted file mode 100644
index dbd95c9ea..000000000
--- a/community/sshguard/sshguard.rc
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/bash
-
-. /etc/rc.conf
-. /etc/rc.d/functions
-[ -f /etc/conf.d/sshguard ] && . /etc/conf.d/sshguard
-
-case "$1" in
- start)
- stat_busy "Starting SSHGuard"
- /usr/sbin/sshguard -l /var/log/auth.log -b /var/db/sshguard/blacklist.db ${SSHGUARD_ARGS} &> /dev/null &
- add_daemon sshguard
- stat_done
- ;;
- stop)
- stat_busy "Stopping SSHGuard"
- kill `pidof sshguard` &> /dev/null
- rm_daemon sshguard
- stat_done
- ;;
- restart)
- $0 stop
- $0 start
- ;;
-*)
- echo "usage: $0 {start|stop|restart}"
-esac
-exit 0
diff --git a/community/sshguard/sshguard.service b/community/sshguard/sshguard.service
index 9340d8e9f..d6324d459 100644
--- a/community/sshguard/sshguard.service
+++ b/community/sshguard/sshguard.service
@@ -1,7 +1,7 @@
[Unit]
Description=Block hacking attempts
-After=iptables.service network.target
-Wants=iptables.service
+After=iptables.service ip6tables.service network.target
+Wants=iptables.service ip6tables.service
[Service]
ExecStart=/usr/lib/systemd/scripts/sshguard-journalctl -b /var/db/sshguard/blacklist.db