24 lines
693 B
Text
24 lines
693 B
Text
|
#!/bin/bash
|
||
|
|
||
|
set -e
|
||
|
|
||
|
if [[ "$1" == "configure" ]]; then
|
||
|
|
||
|
if ! getent group mautrix-signal >/dev/null; then
|
||
|
groupadd --system mautrix-signal
|
||
|
fi
|
||
|
|
||
|
if ! getent passwd mautrix-signal >/dev/null; then
|
||
|
useradd --system --gid mautrix-signal --home-dir /var/lib/mautrix-signal --shell /bin/bash mautrix-signal
|
||
|
fi
|
||
|
|
||
|
chown mautrix-signal:mautrix-signal /var/lib/mautrix-signal /var/log/mautrix-signal
|
||
|
chmod 0750 /var/lib/mautrix-signal /var/log/mautrix-signal
|
||
|
chown root:mautrix-signal /etc/mautrix-signal.yml
|
||
|
chmod 0640 /etc/mautrix-signal.yml
|
||
|
|
||
|
deb-systemd-helper enable mautrix-signal.service
|
||
|
deb-systemd-invoke restart mautrix-signal.service
|
||
|
|
||
|
fi
|