mirror of
https://github.com/processone/docker-ejabberd
synced 2024-11-10 13:10:37 +00:00
18 lines
287 B
Bash
18 lines
287 B
Bash
|
#!/bin/bash
|
||
|
set -e
|
||
|
|
||
|
if [ "${1:0:1}" = '-' ]; then
|
||
|
set -- ejabberd "$@"
|
||
|
fi
|
||
|
|
||
|
if [ "$1" = 'ejabberd' ]; then
|
||
|
mkdir -p "$P1DATA"
|
||
|
chmod 700 "$P1DATA"
|
||
|
chown -R p1 "$P1DATA"
|
||
|
mkdir -p "$P1LOG"
|
||
|
chmod 700 "$P1LOG"
|
||
|
chown -R p1 "$P1LOG"
|
||
|
|
||
|
su-exec p1 $HOME/ejabberd/bin/ejabberd foreground
|
||
|
fi
|