freebsd-ports/net/freeswitch-core-devel/files/pkg-install.in
Chris Rees e634049e1e Add configuration ports for freeswitch-devel; vanilla, sbc, insideout and curl
PR:		ports/167877
PR:		ports/167878
PR:		ports/167879
PR:		ports/167881
Submitted by:	Richard Neese (r.neese@gmail.com) (maintainer)

Fix some minor pkg-install script issues in -core-devel

Use a cookie file to install ETCDIR/conf directory structure rather than
@exec mkdir to simplify installation
2012-05-22 19:12:47 +00:00

39 lines
1.2 KiB
Bash

#!/bin/sh
# $FreeBSD: /tmp/pcvs/ports/net/freeswitch-core-devel/files/pkg-install.in,v 1.2 2012-05-22 19:12:47 crees Exp $
#
if [ "$2" != "POST-INSTALL" ]; then
exit 0
fi
for dir in \
etc/freeswitch/conf/directory/default \
etc/freeswitch/scripts \
share/freeswitch/sounds
do install -d -o %%FREESWITCH_USER%% -g %%FREESWITCH_GROUP%% ${PKG_PREFIX}/$dir
done
find ${PKG_PREFIX}/etc/freeswitch/ -type d -exec chmod 770 {} +
find ${PKG_PREFIX}/etc/freeswitch/ -type f -exec chmod 660 {} +
/usr/sbin/chown -R %%FREESWITCH_USER%%:%%FREESWITCH_GROUP%% \
%%ETCDIR%% %%DATADIR%% \
${PKG_PREFIX}/include/freeswitch \
${PKG_PREFIX}/lib/freeswitch
chmod 775 ${PKG_PREFIX}/share/freeswitch
for dir in \
db/freeswitch \
freeswitch/recordings \
log/freeswitch/xml_cdr
do install -d -m 775 -o %%FREESWITCH_USER%% -g %%FREESWITCH_GROUP%% /var/$dir
done
echo "This port chown -R various directories %%FREESWITCH_USER%%:%%FREESWITCH_GROUP%%"
echo "This port chmod -R 770 various directories"
echo "This port chmod -R 660 various files"
echo "This is for security reasons. In the event something should"
echo "stop working, please take the time to check the following dirs:"
echo " /var/log/freeswitch /var/freeswitch"
exit 0