aboutsummaryrefslogtreecommitdiffstats
path: root/net-im/jabber/files/pkg-install.in
blob: 8208cf7d5cc53d3aad4a912f738a788c7199009e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/sh

if [ "$2" != "POST-INSTALL" ]; then
    exit 0
fi

USER=%%JABBER_USER%%
GROUP=%%JABBER_GROUP%%
RUNDIR=%%JABBER_RUNDIR%%
SPOOLDIR=%%JABBER_SPOOLDIR%%
LOGDIR=%%JABBER_LOGDIR%%

if [ ! -d ${RUNDIR} ]; then
    echo "Creating \"${RUNDIR}\"."
    mkdir -p ${RUNDIR}
fi

echo "Fixing ownerships and modes in \"${RUNDIR}\"."
chown -R ${USER}:${GROUP} ${RUNDIR}
chmod -R go= ${RUNDIR}

if [ ! -d ${SPOOLDIR} ]; then
    echo "Creating \"${SPOOLDIR}\"."
    mkdir -p ${SPOOLDIR}
fi

if [ ! -d ${LOGDIR} ]; then
    echo "Creating \"${LOGDIR}\"."
    mkdir -p ${LOGDIR}
fi

echo "Fixing ownerships and modes in \"${SPOOLDIR}\"."
chown -R ${USER}:${GROUP} ${SPOOLDIR}
chmod -R go= ${SPOOLDIR}