freebsd-ports/net/freeswitch-core/files/pkg-install.in

40 lines
1.2 KiB
Text
Raw Normal View History

#!/bin/sh
# $FreeBSD: /tmp/pcvs/ports/net/freeswitch-core/files/pkg-install.in,v 1.4 2011-10-28 21:56:51 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
for dir in etc/freeswitch include/freeswitch lib/freeswitch share/freeswitch
do chown %%FREESWITCH_USER%%:%%FREESWITCH_GROUP%% ${PKG_PREFIX}/$dir
done
find ${PKG_PREFIX}/etc/freeswitch/ -type d -exec chmod 755 {} +
chmod 775 ${PKG_PREFIX}/share/freeswitch
# @cwd /var
for dir in \
db/freeswitch \
freeswitch/recordings \
log/freeswitch/xml_cdr \
spool/freeswitch/voicemail
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 775 various directories"
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/spool/freeswitch /var/log/freeswitch /var/freeswitch"
exit 0