opnsense-ports/mail/openwebmail/files/pkg-install.in
Franco Fichtner 8cb1a96ede ports: pull in a snapshot of the FreeBSD ports tree
Taken from:	https://github.com/freebsd/freebsd-ports.git
Commit id:	5070672073b68be364139bc6b3a89100bd17d331
2014-11-09 14:03:21 +01:00

22 lines
892 B
Bash

#!/bin/sh
if [ "$2" != "POST-INSTALL" ]; then
exit 0
fi
mkdir -p ${PKG_PREFIX}/www/cgi-bin/openwebmail/etc/addressbooks
mkdir -p ${PKG_PREFIX}/www/cgi-bin/openwebmail/etc/sessions
chmod 0770 ${PKG_PREFIX}/www/cgi-bin/openwebmail/etc/sessions
mkdir -p ${PKG_PREFIX}/www/cgi-bin/openwebmail/etc/users
chmod 0700 ${PKG_PREFIX}/www/cgi-bin/openwebmail/etc/users
chmod 4755 ${PKG_PREFIX}/www/cgi-bin/openwebmail/openwebmail*pl
for x in addressbooks/global calendar.book; do
if [ ! -s "${PKG_PREFIX}/www/cgi-bin/openwebmail/etc/${x}" ]; then
touch ${PKG_PREFIX}/www/cgi-bin/openwebmail/etc/${x}
chmod 0666 ${PKG_PREFIX}/www/cgi-bin/openwebmail/etc/${x}
fi
done
%%WITHOUT_SPEEDYCGI%% perl ${PKG_PREFIX}/www/cgi-bin/openwebmail/misc/tools/wrapsuid/wrapsuid.pl ${PKG_PREFIX}/www/cgi-bin/openwebmail 2>/dev/null
${PKG_PREFIX}/www/cgi-bin/openwebmail/openwebmail-tool.pl --init --no