mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-29 06:06:32 +00:00
ejabberd: allow one to change SPOOLDIR location
By default, ejabberd saves the mnesia database into /var/lib/ejabberd. Otherwise, one might want to change this location (e.g., if /var/lib is read-only). Add an option in the init script to offer this possibility. Signed-off-by: Johan Oudinet <johan.oudinet@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
This commit is contained in:
parent
0972c9c10b
commit
f266a36d62
@ -3,11 +3,16 @@
|
|||||||
# Start/stop ejabberd
|
# Start/stop ejabberd
|
||||||
#
|
#
|
||||||
|
|
||||||
|
NAME=ejabberd
|
||||||
USER=ejabberd
|
USER=ejabberd
|
||||||
RUNDIR=/var/run/ejabberd
|
RUNDIR=/var/run/ejabberd
|
||||||
|
SPOOLDIR=/var/lib/ejabberd
|
||||||
|
|
||||||
|
# Read configuration variable file if it is present.
|
||||||
|
[ -r /etc/default/$NAME ] && . /etc/default/$NAME
|
||||||
|
|
||||||
mkrundir() {
|
mkrundir() {
|
||||||
install -d -o "$USER" -g "$USER" "$RUNDIR"
|
install -d -o "$USER" -g "$USER" "$RUNDIR" "$SPOOLDIR"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Run ejabberdctl as user $USER.
|
# Run ejabberdctl as user $USER.
|
||||||
@ -19,7 +24,7 @@ case "$1" in
|
|||||||
start)
|
start)
|
||||||
mkrundir || exit 1
|
mkrundir || exit 1
|
||||||
echo -n "Starting ejabberd... "
|
echo -n "Starting ejabberd... "
|
||||||
ctl start
|
ctl start --spool "$SPOOLDIR"
|
||||||
;;
|
;;
|
||||||
stop)
|
stop)
|
||||||
echo -n "Stopping ejabberd... "
|
echo -n "Stopping ejabberd... "
|
||||||
|
Loading…
x
Reference in New Issue
Block a user