aboutsummaryrefslogtreecommitdiffstats
path: root/www/apache22/pkg-install
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>2001-10-30 04:05:37 +0800
committerache <ache@FreeBSD.org>2001-10-30 04:05:37 +0800
commitf1de343b8c84c22858eaa1bff9a34146e889275a (patch)
tree548b68d01c82ee7c809e269acc22588a47b284ab /www/apache22/pkg-install
parentae4ed2abc1b160164ed818a41507b314657189f4 (diff)
downloadfreebsd-ports-gnome-f1de343b8c84c22858eaa1bff9a34146e889275a.tar.gz
freebsd-ports-gnome-f1de343b8c84c22858eaa1bff9a34146e889275a.tar.zst
freebsd-ports-gnome-f1de343b8c84c22858eaa1bff9a34146e889275a.zip
Second part to fix missing x-bit on pkg*install
PR: 31599
Diffstat (limited to 'www/apache22/pkg-install')
-rw-r--r--www/apache22/pkg-install35
1 files changed, 35 insertions, 0 deletions
diff --git a/www/apache22/pkg-install b/www/apache22/pkg-install
new file mode 100644
index 000000000000..3bb99133ae49
--- /dev/null
+++ b/www/apache22/pkg-install
@@ -0,0 +1,35 @@
+#!/bin/sh
+# $FreeBSD$
+#
+
+if [ "$2" != "PRE-INSTALL" ]; then
+ exit 0
+fi
+
+USER=www
+GROUP=${USER}
+UID=80
+GID=${UID}
+
+if ! pw groupshow "${GROUP}" 2>/dev/null 1>&2; then
+ if pw groupadd ${GROUP} -g ${GID}; then
+ echo "Added group \"${GROUP}\"."
+ else
+ echo "Adding group \"${GROUP}\" failed..."
+ exit 1
+ fi
+fi
+
+if ! pw usershow "${USER}" 2>/dev/null 1>&2; then
+ if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \
+ -s "/sbin/nologin" -d "/nonexistent" \
+ -c "World Wide Web Owner"; \
+ then
+ echo "Added user \"${USER}\"."
+ else
+ echo "Adding user \"${USER}\" failed..."
+ exit 1
+ fi
+fi
+
+exit 0