kill INSTALL/DEINSTALL

This commit is contained in:
espie 2004-09-24 09:16:05 +00:00
parent 554758f974
commit 88b405b56e
3 changed files with 8 additions and 86 deletions

View File

@ -1,24 +0,0 @@
#!/bin/sh
# $OpenBSD: DEINSTALL,v 1.2 2004/04/15 07:34:11 xsa Exp $
#
# milter-regex de-installation
PATH=/bin:/usr/bin:/sbin:/usr/sbin
DIR=/var/spool/milter-regex
USER=_milter-regex
GROUP=_milter-regex
if [ ${PKG_DELETE_EXTRA} != Yes -a -d $DIR ]; then
echo
echo "+---------------"
echo "| To completely deinstall the $1 package you need to perform"
echo "| these steps as root:"
echo "|"
echo "| userdel $USER"
echo "| groupdel $GROUP"
echo "| rm -rf $DIR"
echo "+---------------"
echo
fi
exit 0

View File

@ -1,58 +0,0 @@
#!/bin/sh
# $OpenBSD: INSTALL,v 1.1 2004/01/07 14:57:34 dhartmei Exp $
#
# Pre/post-installation setup of milter-regex
PATH=/bin:/usr/bin:/sbin:/usr/sbin
DIR=/var/spool/milter-regex
USER=_milter-regex
GROUP=_milter-regex
ID=527
do_usergroup_install()
{
# Create milter-regex user and group
groupinfo -e $GROUP
if [ $? -eq 0 ]; then
echo "===> Using $GROUP group for milter-regex"
else
echo "===> Creating $GROUP group for milter-regex"
groupadd -g $ID $GROUP
fi
userinfo -e $USER
if [ $? -eq 0 ]; then
echo "===> Using $USER user for milter-regex"
else
echo "===> Creating $USER user for milter-regex"
useradd -g $GROUP -d /nonexistent -L daemon \
-c 'milter-regex Account' -s /sbin/nologin \
-u $ID $USER 2>&1| grep nonexistant >&2
fi
}
do_install()
{
install -d -o $USER -g $GROUP -m 700 $DIR
}
if [ $# -ne 2 ]; then
echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2
exit 1
fi
case $2 in
PRE-INSTALL)
do_usergroup_install
if [ ! -d $DIR ]; then
do_install
fi
;;
POST-INSTALL)
;;
*)
echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2
exit 1
;;
esac
exit 0

View File

@ -1,6 +1,10 @@
@comment $OpenBSD: PLIST,v 1.3 2004/09/15 09:09:43 espie Exp $
@comment $OpenBSD: PLIST,v 1.4 2004/09/24 09:16:05 espie Exp $
@newgroup _milter-regex:527
@newuser _milter-regex:527:_milter-regex:daemon:milter-regex Account:/nonexistent:/sbin/nologin
libexec/milter-regex
@man man/man8/milter-regex.8
@extraunexec rm -rf /var/spool/milter-regex
@extraunexec userdel _milter-regex
@extraunexec groupdel _milter-regex
@group _milter-regex
@user _milter-regex
@mode 700
@sample /var/spool/milter-regex/
@extraunexec rm -rf /var/spool/milter-regex/*