aboutsummaryrefslogtreecommitdiffstats
path: root/www/moinmoin/files
diff options
context:
space:
mode:
authorijliao <ijliao@FreeBSD.org>2001-10-15 20:43:36 +0800
committerijliao <ijliao@FreeBSD.org>2001-10-15 20:43:36 +0800
commitbe74c159ade8015cad57096f65e73170bb4ca7b7 (patch)
tree42fc59600eeb18372e8acd01d8daf5e5bef2319e /www/moinmoin/files
parente53d4504c005be89cc94adf18b913e984fb11512 (diff)
downloadfreebsd-ports-gnome-be74c159ade8015cad57096f65e73170bb4ca7b7.tar.gz
freebsd-ports-gnome-be74c159ade8015cad57096f65e73170bb4ca7b7.tar.zst
freebsd-ports-gnome-be74c159ade8015cad57096f65e73170bb4ca7b7.zip
add moinmoin
A Python CGI clone of WikiWiki PR: 30669 Submitted by: Hye-Shik Chang <perky@python.or.kr>
Diffstat (limited to 'www/moinmoin/files')
-rw-r--r--www/moinmoin/files/configure.sh37
-rw-r--r--www/moinmoin/files/wrapper.c13
2 files changed, 50 insertions, 0 deletions
diff --git a/www/moinmoin/files/configure.sh b/www/moinmoin/files/configure.sh
new file mode 100644
index 000000000000..3cdc44eccdba
--- /dev/null
+++ b/www/moinmoin/files/configure.sh
@@ -0,0 +1,37 @@
+#!/bin/sh
+# $FreeBSD$
+# * stolen from mailman port.
+
+USER=$1
+UID=$2
+GROUP=${USER}
+GID=${UID}
+
+if [ -z "$USER" -o -z "$UID" ]; then
+ echo "Syntax: $0 <username> <uid>"
+ exit 1
+fi
+
+if pw group show "${GROUP}" 2>/dev/null; then
+ echo "You already have a group \"${GROUP}\", so I will use it."
+else
+ if pw groupadd ${GROUP} -g ${GID}; then
+ echo "Added group \"${GROUP}\"."
+ else
+ echo "Adding group \"${GROUP}\" failed..."
+ exit 1
+ fi
+fi
+
+if pw user show "${USER}" 2>/dev/null; then
+ echo "You already have a user \"${USER}\", so I will use it."
+else
+ if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \
+ -d /notexistence -s /sbin/nologin -c "MoinMoin User"
+ then
+ echo "Added user \"${USER}\"."
+ else
+ echo "Adding user \"${USER}\" failed..."
+ exit 1
+ fi
+fi
diff --git a/www/moinmoin/files/wrapper.c b/www/moinmoin/files/wrapper.c
new file mode 100644
index 000000000000..3f41506f652c
--- /dev/null
+++ b/www/moinmoin/files/wrapper.c
@@ -0,0 +1,13 @@
+/*
+ MoinMoin setuid wrapper by perky
+ $FreeBSD$
+*/
+#include <unistd.h>
+
+int
+main(int argc, char *argv[], char *envp[])
+{
+ char *margv[] = { PYTHON_PATH, SCRIPT_PATH, NULL };
+
+ return exect(PYTHON_PATH, margv, envp);
+}