mirror of
https://gitlab.com/famedly/conduit.git
synced 2024-11-17 02:38:18 -07:00
27 lines
681 B
Plaintext
27 lines
681 B
Plaintext
|
#!/bin/sh
|
||
|
set -e
|
||
|
|
||
|
CONDUIT_DATABASE_PATH=/var/lib/matrix-conduit
|
||
|
|
||
|
case "$1" in
|
||
|
configure)
|
||
|
# Create the `_matrix-conduit` user if it does not exist yet.
|
||
|
if ! getent passwd _matrix-conduit > /dev/null ; then
|
||
|
echo 'Adding system user for the Conduit Matrix homeserver' 1>&2
|
||
|
adduser --system --group --quiet \
|
||
|
--home $CONDUIT_DATABASE_PATH \
|
||
|
--disabled-login \
|
||
|
--force-badname \
|
||
|
_matrix-conduit
|
||
|
fi
|
||
|
|
||
|
# Create the database path if it does not exist yet.
|
||
|
if [ ! -d "$CONDUIT_DATABASE_PATH" ]; then
|
||
|
mkdir -p "$CONDUIT_DATABASE_PATH"
|
||
|
chown _matrix-conduit "$CONDUIT_DATABASE_PATH"
|
||
|
fi
|
||
|
;;
|
||
|
esac
|
||
|
|
||
|
#DEBHELPER#
|