mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-20 08:27:15 +00:00
Add bopm 3.1.2,
bopm is an open-source open proxy monitor, designed for use with hybrid-based ircds, although it can be used with slight modification on any server which has +c to show connects to opers and that supports KLINEs in order to K-LINE incoming connects from open proxies. PR: ports/70065 Submitted by: Evgueni V. Gavrilov <aquatique@rusunix.org>
This commit is contained in:
parent
9d11b20f6f
commit
d46c5b1fc5
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=115496
@ -9,6 +9,7 @@
|
||||
SUBDIR += blackened
|
||||
SUBDIR += bnc
|
||||
SUBDIR += bobot++
|
||||
SUBDIR += bopm
|
||||
SUBDIR += ctrlproxy
|
||||
SUBDIR += dancer
|
||||
SUBDIR += dancer-ircd
|
||||
|
35
irc/bopm/Makefile
Normal file
35
irc/bopm/Makefile
Normal file
@ -0,0 +1,35 @@
|
||||
# New ports collection makefile for: bopm
|
||||
# Date Created: 2004.08.06
|
||||
# Whom: Evgueni V. Gavrilov <aquatique@rusunix.org>
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
PORTNAME= bopm
|
||||
PORTVERSION= 3.1.2
|
||||
CATEGORIES= irc
|
||||
MASTER_SITES= http://static.blitzed.org/www.blitzed.org/bopm/files/ \
|
||||
ftp://rusunix.org/pub/FreeBSD/distfiles/
|
||||
|
||||
MAINTAINER= aquatique-ports@rambler.ru
|
||||
COMMENT= Open proxy monitor and blocker, designed for use with ircds
|
||||
|
||||
USE_REINPLACE= yes
|
||||
GNU_CONFIGURE= yes
|
||||
CONFIGURE_TARGET=--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
|
||||
CONFIGURE_ARGS= --sysconfdir=${PREFIX}/etc
|
||||
|
||||
INSTALLS_SHLIB= yes
|
||||
|
||||
post-patch:
|
||||
@${REINPLACE_CMD} -e 's,^[[:space:]]*$$(mkinstalldirs) $$(localstatedir),,' ${WRKSRC}/Makefile.in
|
||||
@${REINPLACE_CMD} -e 's,= bopm.conf.sample,= ,' ${WRKSRC}/Makefile.in
|
||||
|
||||
pre-install:
|
||||
@${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
|
||||
|
||||
post-install:
|
||||
@${INSTALL_SCRIPT} -m 555 ${FILESDIR}/bopm.sh.sample ${PREFIX}/etc/rc.d
|
||||
@${CAT} ${PKGMESSAGE}
|
||||
|
||||
.include <bsd.port.mk>
|
2
irc/bopm/distinfo
Normal file
2
irc/bopm/distinfo
Normal file
@ -0,0 +1,2 @@
|
||||
MD5 (bopm-3.1.2.tar.gz) = ab1b7494c4242eef957b5fca61c92b18
|
||||
SIZE (bopm-3.1.2.tar.gz) = 608855
|
24
irc/bopm/files/bopm.sh.sample
Normal file
24
irc/bopm/files/bopm.sh.sample
Normal file
@ -0,0 +1,24 @@
|
||||
#!/bin/sh
|
||||
|
||||
PREFIX=$(expr $0 : "\(/.*/\)etc/rc\.d/$(basename $0)\$")
|
||||
|
||||
BOPM=${PREFIX}bin/bopm
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
if [ -x $BOPM ]; then
|
||||
su bopm -c $BOPM -d >/dev/null 2>&1
|
||||
echo -n ' bopm'
|
||||
fi
|
||||
;;
|
||||
stop)
|
||||
# kill `cat ${PREFIX}/etc/ircd-hybrid-ru/ircd.pid` >/dev/null 2>&1
|
||||
killall bopm >/dev/null 2>&1
|
||||
echo -n ' bopm'
|
||||
;;
|
||||
*)
|
||||
echo "Usage: `basename $0` {start|stop}" >&2
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
54
irc/bopm/pkg-deinstall
Normal file
54
irc/bopm/pkg-deinstall
Normal file
@ -0,0 +1,54 @@
|
||||
#! /bin/sh
|
||||
|
||||
ask() {
|
||||
local question default answer
|
||||
|
||||
question=$1
|
||||
default=$2
|
||||
if [ -z "${PACKAGE_BUILDING}" -a -z "${BATCH}" ]; then
|
||||
read -p "${question} [${default}]? " answer
|
||||
fi
|
||||
echo ${answer:-${default}}
|
||||
}
|
||||
|
||||
yesno() {
|
||||
local question default answer
|
||||
|
||||
question=$1
|
||||
default=$2
|
||||
while :; do
|
||||
answer=$(ask "${question}" "${default}")
|
||||
case "${answer}" in
|
||||
[Yy]*) return 0;;
|
||||
[Nn]*) return 1;;
|
||||
esac
|
||||
echo "Please answer yes or no."
|
||||
done
|
||||
}
|
||||
|
||||
delete_account() {
|
||||
local u
|
||||
|
||||
u=$1
|
||||
if yesno "Do you want me to remove user \"${u}\"" n; then
|
||||
pw userdel -n ${u}
|
||||
echo "Done."
|
||||
fi
|
||||
}
|
||||
|
||||
case $2 in
|
||||
|
||||
DEINSTALL)
|
||||
if ps -axc | grep -qw bopm; then
|
||||
if yesno "bopm is still running. Shall I stop it?" y; then
|
||||
killall bopm
|
||||
sleep 2
|
||||
else
|
||||
echo "OK ... I hope you know what you are doing."
|
||||
fi
|
||||
fi
|
||||
|
||||
delete_account bopm
|
||||
;;
|
||||
|
||||
esac
|
7
irc/bopm/pkg-descr
Normal file
7
irc/bopm/pkg-descr
Normal file
@ -0,0 +1,7 @@
|
||||
bopm is an open-source open proxy monitor, designed for use
|
||||
with hybrid-based ircds, although it can be used with slight
|
||||
modification on any server which has +c to show connects to
|
||||
opers and that supports KLINEs in order to K-LINE incoming
|
||||
connects from open proxies
|
||||
|
||||
WWW: http://blitzed.org/bopm/
|
68
irc/bopm/pkg-install
Normal file
68
irc/bopm/pkg-install
Normal file
@ -0,0 +1,68 @@
|
||||
#!/bin/sh
|
||||
|
||||
# This script is a modified copy of the pkg-install script
|
||||
# from the ircd-hybrid-ru port.
|
||||
|
||||
if [ "x$2" != "xPRE-INSTALL" ]; then
|
||||
exit 0;
|
||||
fi
|
||||
|
||||
|
||||
if ! which -s pw ; then
|
||||
cat <<EOF
|
||||
Your system does not include the "pw" utility. You should upgrade
|
||||
to a newer version of FreeBSD. Without "pw" this script will not
|
||||
run.
|
||||
EOF
|
||||
exit 1
|
||||
fi
|
||||
|
||||
uid=717
|
||||
user=bopm
|
||||
gid=$uid
|
||||
group=$user
|
||||
gecos="Blitzed Open Proxy Monitor"
|
||||
shell="/bin/sh"
|
||||
home="/nonexistent"
|
||||
|
||||
echo ""
|
||||
if pw groupshow $group 2> /dev/null ; then
|
||||
echo "You already have a group \"$group\", so I will use it."
|
||||
else
|
||||
if pw groupshow $gid 2> /dev/null ; then
|
||||
echo "You already have a gid \"$gid\". Please create a user \"$group\""
|
||||
echo "with a default group of \"$group\"."
|
||||
exit 1
|
||||
fi
|
||||
echo "You need a group \"$group\"."
|
||||
if which -s pw ; then
|
||||
pw groupadd $group -g $gid || exit
|
||||
echo "Done."
|
||||
else
|
||||
echo "Please create it, and try again."
|
||||
if ! pw usershow $user 2> /dev/null ; then
|
||||
echo "While you're at it, please create a user \"$user\""
|
||||
echo 'too, with a default group of "$group".'
|
||||
fi
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if pw usershow $user 2> /dev/null ; then
|
||||
echo "You already have a user \"$user\", so I will use it."
|
||||
else
|
||||
if pw usershow $uid 2> /dev/null ; then
|
||||
echo "You already have a uid \"$uid\". Please create a user \"$user\""
|
||||
echo "with a default group of \"$group\"."
|
||||
exit 1
|
||||
fi
|
||||
echo "You need a user \"$user\"."
|
||||
if which -s pw; then
|
||||
pw useradd $user -g $group -u $uid -h - -d $home \
|
||||
-s "$shell" -c "$gecos" || exit
|
||||
echo "Done."
|
||||
else
|
||||
echo "Please create it, and try again."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
17
irc/bopm/pkg-message
Normal file
17
irc/bopm/pkg-message
Normal file
@ -0,0 +1,17 @@
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
This port uses now UID/GID - 717
|
||||
|
||||
bopm has been installed.
|
||||
|
||||
This port create user bopm and group bopm
|
||||
|
||||
You should now edit bopm.conf it to suit your needs.
|
||||
|
||||
You may then start the bopm by running:
|
||||
cd /usr/local/etc/rc.d/ && \
|
||||
cp bopm.sh.sample bopm.sh && \
|
||||
/usr/local/etc/rc.d/bopm.sh start
|
||||
|
||||
----------------------------------------------------
|
14
irc/bopm/pkg-plist
Normal file
14
irc/bopm/pkg-plist
Normal file
@ -0,0 +1,14 @@
|
||||
bin/bopm
|
||||
etc/bopm.conf
|
||||
etc/rc.d/bopm.sh.sample
|
||||
include/opm.h
|
||||
include/opm_error.h
|
||||
include/opm_types.h
|
||||
include/opm_common.h
|
||||
lib/libopm.so.0
|
||||
lib/libopm.so
|
||||
lib/libopm.la
|
||||
lib/libopm.a
|
||||
@exec mkdir -m 755 /var/log/bopm
|
||||
@exec chown bopm:bopm /var/log/bopm
|
||||
@unexec rmdir %D/var/log/bopm 2>/dev/null || true
|
Loading…
Reference in New Issue
Block a user