Skip to content

Commit

Permalink
Allow the daemon to be packaged for Ubuntu (precise, so far)
Browse files Browse the repository at this point in the history
  • Loading branch information
HeisSpiter committed Sep 4, 2014
1 parent 3dada78 commit 1f08c17
Show file tree
Hide file tree
Showing 7 changed files with 107 additions and 0 deletions.
5 changes: 5 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
forbidhosts (1.0-1) precise; urgency=low

* Initial release

-- Pierre Schweitzer <pierre@reactos.org> Thu, 4 Sep 2014 14:18:08 +0200
1 change: 1 addition & 0 deletions debian/compat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
9
21 changes: 21 additions & 0 deletions debian/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Source: forbidhosts
Maintainer: Pierre Schweitzer <pierre@reactos.org>
Section: net
Priority: extra
Standards-Version: 3.9.3
Build-Depends: debhelper (>= 9), autotools-dev, libtool, autoconf, automake, dh-autoreconf

Package: forbidhosts
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: Tool for checking IPv4 and IPv6 SSH failed connections
ForbidHosts is a tool that has been designed to run with DenyHosts on IPv6 enabled systems. While DenyHosts will catch IPv4 connections on SSH, ForbidHosts only focuses on IPv6 connections.
.
Its behaviour is simple. Once too many connections attempts have been detected, it simply adds the IP in /etc/hosts.deny and mails root.
.
ForbidHosts does not take any argument. Run it, it will fork in background. Kill it with signals.
.
This has been specifically designed for the ReactOS Foundation infrastructure, but we are open to suggestions and patches :-).
.
Starting on the 26-Aug-2014, support for IPv4 was added (optional though) because Ubuntu dropped DenyHosts in Ubuntu 14.04 LTS. The features for IPv4 and IPv6 are exactly the same.
Homepage: https://www.reactos.org
20 changes: 20 additions & 0 deletions debian/copyright
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
This package was debianized by Pierre Schweitzer <pierre@reactos.org> on
Thu, 4 Sep 2014 14:18:08 +0200.

It was downloaded from https://github.com/HeisSpiter/forbidhosts.git

Current Maintaines: Pierre Schweitzer <pierre@reactos.org>

Upstream Author: Pierre Schweitzer (pierre@reactos.org)

Copyright (c) 2014-2014 Pierre Schweitzer (pierre@reactos.org)

License:

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.

On Debian systems, the complete text of the GNU General Public
License can be found in /usr/share/common-licenses/GPL.
50 changes: 50 additions & 0 deletions debian/forbidhosts.init
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#!/bin/sh

### BEGIN INIT INFO
# Provides: forbidhosts
# Required-Start: $syslog $local_fs $remote_fs $time
# Required-Stop: $syslog $local_fs $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: forbidhosts
# Description: SSH IPv4 and IPv6 connections check
### END INIT INFO

. /lib/lsb/init-functions

[ -f /etc/default/rcS ] && . /etc/default/rcS
PATH=/bin:/usr/bin:/sbin:/usr/sbin
PROGRAM=/usr/sbin/ForbidHosts

test -x $PROGRAM || exit 0

case "$1" in
start)
COUNT=`pgrep -c ForbidHosts`
[ "x$COUNT" != "x0" ] && exit 0
$PROGRAM
exit 0
;;
stop)
pkill -15 ForbidHosts
exit 0
;;
force-reload|restart)
$0 stop
$0 start
;;
status)
COUNT=`pgrep -c ForbidHosts`
if [ "x$COUNT" != "x0" ]; then
echo "Running"
else
echo "Not running"
fi
exit 0
;;
*)
echo "Usage: /etc/init.d/forbidhosts {start|stop|restart|force-reload|status}"
exit 1
esac

exit 0
9 changes: 9 additions & 0 deletions debian/rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/make -f
%:
dh $@ --with autoreconf

override_dh_autoreconf:
dh_autoreconf ./autogen.sh

override_dh_auto_configure:
dh_auto_configure -- --enable-ipv4
1 change: 1 addition & 0 deletions debian/source/format
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.0 (quilt)

0 comments on commit 1f08c17

Please sign in to comment.