- Replace (DE)INSTALL with @sample, @newuser and @newgroup
- Bump PKGNAME - Remove no longer needed @extra*s ok jolan@
This commit is contained in:
parent
5f2c73aac0
commit
eab5953d53
@ -1,7 +1,8 @@
|
||||
# $OpenBSD: Makefile,v 1.4 2003/09/25 05:32:21 jolan Exp $
|
||||
# $OpenBSD: Makefile,v 1.5 2004/11/26 16:37:10 alek Exp $
|
||||
|
||||
COMMENT= "filtering HTTP proxy server"
|
||||
DISTNAME= ffproxy-1.5.1
|
||||
PKGNAME= ${DISTNAME}p0
|
||||
CATEGORIES= www
|
||||
MASTER_SITES= http://faith.eu.org/ffproxy/
|
||||
|
||||
|
@ -1,34 +0,0 @@
|
||||
#!/bin/sh
|
||||
# $OpenBSD: DEINSTALL,v 1.3 2004/04/15 07:34:11 xsa Exp $
|
||||
PATH=/bin:/usr/bin:/sbin:/usr/sbin
|
||||
PREFIX=${PKG_PREFIX:-/usr/local}
|
||||
SYSCONFDIR=${SYSCONFDIR:-/etc}
|
||||
CONFIG_FILE=${SYSCONFDIR}/ffproxy.conf
|
||||
FFPROXYDIR=/var/ffproxy
|
||||
FFPROXYUSER=_ffproxy
|
||||
FFPROXYGROUP=_ffproxy
|
||||
|
||||
if [ ${PKG_DELETE_EXTRA} != Yes -a -f $CONFIG_FILE ]; then
|
||||
echo
|
||||
echo "+---------------"
|
||||
echo "| To completely deinstall the $1 package you need to perform"
|
||||
echo "| these steps as root:"
|
||||
echo "|"
|
||||
if userinfo -e $FFPROXYUSER; then
|
||||
echo "| userdel $FFPROXYUSER"
|
||||
fi
|
||||
if groupinfo -e $FFPROXYGROUP; then
|
||||
echo "| groupdel $FFPROXYGROUP"
|
||||
fi
|
||||
echo "| rm -f $CONFIG_FILE"
|
||||
if [ -d $FFPROXYDIR ]; then
|
||||
echo "| rm -rf $FFPROXYDIR"
|
||||
fi
|
||||
echo "|"
|
||||
echo "| Do not do this if you plan on re-installing $1"
|
||||
echo "| at some future time."
|
||||
echo "+---------------"
|
||||
echo
|
||||
fi
|
||||
|
||||
exit 0
|
@ -1,111 +0,0 @@
|
||||
#!/bin/sh
|
||||
# $OpenBSD: INSTALL,v 1.2 2003/08/08 04:27:09 jolan Exp $
|
||||
PATH=/bin:/usr/bin:/sbin:/usr/sbin
|
||||
PREFIX=${PKG_PREFIX:-/usr/local}
|
||||
SYSCONFDIR=${SYSCONFDIR:-/etc}
|
||||
CONFIG_FILE=${SYSCONFDIR}/ffproxy.conf
|
||||
SAMPLE_CONFIG_DIR=$PREFIX/share/examples/ffproxy
|
||||
SAMPLE_CONFIG_FILE=$SAMPLE_CONFIG_DIR/ffproxy.conf
|
||||
FFPROXYDIR=/var/ffproxy
|
||||
FFPROXYUSER=_ffproxy
|
||||
FFPROXYGROUP=_ffproxy
|
||||
ID=523
|
||||
|
||||
do_usergroup_install()
|
||||
{
|
||||
if groupinfo -e $FFPROXYGROUP; then
|
||||
echo "===> Using $FFPROXYGROUP group for ffproxy"
|
||||
else
|
||||
echo "===> Creating $FFPROXYGROUP group for ffproxy"
|
||||
groupadd -g $ID $FFPROXYGROUP
|
||||
fi
|
||||
if userinfo -e $FFPROXYUSER; then
|
||||
echo "===> Using $FFPROXYUSER user for ffproxy"
|
||||
else
|
||||
echo "===> Creating $FFPROXYUSER user for ffproxy"
|
||||
useradd -g $FFPROXYGROUP -d /nonexistent -L daemon -c 'ffproxy Account' -s /sbin/nologin -u $ID $FFPROXYUSER
|
||||
fi
|
||||
}
|
||||
|
||||
do_config_notice()
|
||||
{
|
||||
echo
|
||||
echo "+---------------"
|
||||
echo "| The existing $1 configuration file $CONFIG_FILE"
|
||||
echo "| has NOT been changed. You may want to compare it to the"
|
||||
echo "| current sample file $SAMPLE_CONFIG_FILE,"
|
||||
echo "| and update your configuration as needed."
|
||||
echo "+---------------"
|
||||
}
|
||||
|
||||
do_config_install()
|
||||
{
|
||||
install -o root -g wheel -m 644 $SAMPLE_CONFIG_FILE $CONFIG_FILE
|
||||
echo
|
||||
echo "+---------------"
|
||||
echo "| A $1 configuration file has been installed to:"
|
||||
echo "| $CONFIG_FILE. Please view this file and"
|
||||
echo "| adjust it to suit your needs."
|
||||
echo "+---------------"
|
||||
}
|
||||
|
||||
do_configdir_notice()
|
||||
{
|
||||
echo
|
||||
echo "+---------------"
|
||||
echo "| The existing $1 configuration data in $FFPROXYDIR"
|
||||
echo "| has NOT been changed. You may want to compare it to the"
|
||||
echo "| current sample configuration data in $SAMPLE_CONFIG_DIR,"
|
||||
echo "| and update your configuration data as needed."
|
||||
echo "+---------------"
|
||||
}
|
||||
|
||||
do_configdir_install()
|
||||
{
|
||||
install -d -o root -g wheel -m 755 $FFPROXYDIR
|
||||
install -d -o root -g wheel -m 755 $FFPROXYDIR/db
|
||||
install -d -o root -g wheel -m 755 $FFPROXYDIR/html
|
||||
install -o root -g wheel -m 644 $SAMPLE_CONFIG_DIR/db/* $FFPROXYDIR/db
|
||||
install -o root -g wheel -m 644 $SAMPLE_CONFIG_DIR/html/* $FFPROXYDIR/html
|
||||
echo
|
||||
echo "+---------------"
|
||||
echo "| Configuration data for $1 has been installed to:"
|
||||
echo "|"
|
||||
echo "| $FFPROXYDIR/db"
|
||||
echo "| $FFPROXYDIR/html"
|
||||
echo "|"
|
||||
echo "| Please view the content of these directories and"
|
||||
echo "| adjust it to suit your needs."
|
||||
echo "+---------------"
|
||||
}
|
||||
|
||||
# verify proper execution
|
||||
if [ $# -ne 2 ]; then
|
||||
echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# verify/process the command
|
||||
case $2 in
|
||||
PRE-INSTALL)
|
||||
do_usergroup_install
|
||||
;;
|
||||
POST-INSTALL)
|
||||
if [ ! -f $CONFIG_FILE ]; then
|
||||
do_config_install $1
|
||||
else
|
||||
do_config_notice $1
|
||||
fi
|
||||
if [ ! -d $FFPROXYDIR ]; then
|
||||
do_configdir_install $1
|
||||
else
|
||||
do_configdir_notice $1
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
@ -1,4 +1,6 @@
|
||||
@comment $OpenBSD: PLIST,v 1.4 2004/09/15 18:49:49 espie Exp $
|
||||
@comment $OpenBSD: PLIST,v 1.5 2004/11/26 16:37:10 alek Exp $
|
||||
@newgroup _ffproxy:523
|
||||
@newuser _ffproxy:523:_ffproxy:daemon:ffproxy Account:/nonexistent:/sbin/nologin
|
||||
bin/ffproxy
|
||||
@man man/man5/ffproxy.conf.5
|
||||
@man man/man7/ffproxy.quick.7
|
||||
@ -6,28 +8,45 @@ bin/ffproxy
|
||||
share/doc/ffproxy/
|
||||
share/doc/ffproxy/README
|
||||
share/examples/ffproxy/
|
||||
@sample /var/ffproxy/
|
||||
share/examples/ffproxy/db/
|
||||
@sample /var/ffproxy/db/
|
||||
share/examples/ffproxy/db/access.dyndns
|
||||
@sample /var/ffproxy/db/access.dyndns
|
||||
share/examples/ffproxy/db/access.host
|
||||
@sample /var/ffproxy/db/access.host
|
||||
share/examples/ffproxy/db/access.ip
|
||||
@sample /var/ffproxy/db/access.ip
|
||||
share/examples/ffproxy/db/filter.header.add
|
||||
@sample /var/ffproxy/db/filter.header.add
|
||||
share/examples/ffproxy/db/filter.header.drop
|
||||
@sample /var/ffproxy/db/filter.header.drop
|
||||
share/examples/ffproxy/db/filter.header.entry
|
||||
@sample /var/ffproxy/db/filter.header.entry
|
||||
share/examples/ffproxy/db/filter.header.match
|
||||
@sample /var/ffproxy/db/filter.header.match
|
||||
share/examples/ffproxy/db/filter.host.match
|
||||
@sample /var/ffproxy/db/filter.host.match
|
||||
share/examples/ffproxy/db/filter.rheader.drop
|
||||
@sample /var/ffproxy/db/filter.rheader.drop
|
||||
share/examples/ffproxy/db/filter.rheader.entry
|
||||
@sample /var/ffproxy/db/filter.rheader.entry
|
||||
share/examples/ffproxy/db/filter.rheader.match
|
||||
@sample /var/ffproxy/db/filter.rheader.match
|
||||
share/examples/ffproxy/db/filter.url.match
|
||||
@sample /var/ffproxy/db/filter.url.match
|
||||
share/examples/ffproxy/ffproxy.conf
|
||||
@sample ${SYSCONFDIR}/ffproxy.conf
|
||||
share/examples/ffproxy/html/
|
||||
@sample /var/ffproxy/html/
|
||||
share/examples/ffproxy/html/connect
|
||||
@sample /var/ffproxy/html/connect
|
||||
share/examples/ffproxy/html/filtered
|
||||
@sample /var/ffproxy/html/filtered
|
||||
share/examples/ffproxy/html/invalid
|
||||
@sample /var/ffproxy/html/invalid
|
||||
share/examples/ffproxy/html/post
|
||||
@sample /var/ffproxy/html/post
|
||||
share/examples/ffproxy/html/resolve
|
||||
@cwd ${SYSCONFDIR}
|
||||
@extra ffproxy.conf
|
||||
@sample /var/ffproxy/html/resolve
|
||||
@extraunexec rm -rf /var/ffproxy
|
||||
@extraunexec userdel _ffproxy
|
||||
@extraunexec groupdel _ffproxy
|
||||
|
Loading…
Reference in New Issue
Block a user