2010-06-12 00:26:45 +02:00
|
|
|
#!/bin/sh
|
2011-10-28 23:56:51 +02:00
|
|
|
# $FreeBSD: /tmp/pcvs/ports/net/freeswitch-core/files/pkg-install.in,v 1.4 2011-10-28 21:56:51 crees Exp $
|
2010-06-12 00:26:45 +02:00
|
|
|
#
|
|
|
|
|
2011-10-28 23:56:51 +02:00
|
|
|
if [ "$2" != "POST-INSTALL" ]; then
|
2010-12-08 19:33:22 +01:00
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
2011-10-28 23:56:51 +02:00
|
|
|
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
|
2010-12-08 19:33:22 +01:00
|
|
|
|
2011-10-28 23:56:51 +02:00
|
|
|
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"
|
2010-12-08 19:33:22 +01:00
|
|
|
|
|
|
|
exit 0
|