summaryrefslogtreecommitdiffstats
path: root/myjabberd.sh
blob: 4ac332dd6a9c4d4ca5c4bf52813351307489429e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh -e

DIRNAME=`dirname $0`
cd $DIRNAME
USAGE="$0 [ --update ]"
if [ `id -u` != 0 ]; then
echo 'You must be root to run this script'
exit 1
fi

echo "Building and Loading Policy"
set -x
make -f /usr/share/selinux/devel/Makefile
/usr/sbin/semodule -i myjabberd.pp
/sbin/restorecon -F -R -v /usr/bin/router /usr/bin/sm /usr/bin/c2s /usr/bin/s2s /var/lib/jabberd
/usr/sbin/semanage port -a -t jabber_router_port_t -p tcp 5347 2> /dev/null