summaryrefslogtreecommitdiffstats
path: root/www/raqdevil/pkg-install
blob: 6fc9811e86414739e8e767a843935c58d581a7f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/sh

PATH=/bin:/usr/sbin

case $2 in
POST-INSTALL)
	GROUP=users

	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}; then
			echo "Added group \"${GROUP}\"."
		else
			echo "Adding group \"${GROUP}\" failed..."
			exit 1
		fi
	fi

	/usr/bin/touch /etc/mail/access

	if [ \! -d /usr/local/raqdevil/ui/web/base/sitestats/img ]; then
		mkdir -p /usr/local/raqdevil/ui/web/base/sitestats/img;
		chown www:wheel /usr/local/raqdevil/ui/web/base/sitestats/img;
		mkdir -p /usr/local/raqdevil/skel/spam;
		mkdir -p /usr/local/raqdevil/skel/quarantine;
		mkdir -p /usr/local/raqdevil/sessions;
	fi;

	( cd /etc/namedb; sh /etc/namedb/make-localhost )
	;;
esac
OpenPOWER on IntegriCloud