blob: ccafbc12696e02b4db49771f3436aa31e72af8f7 (
plain)
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
post_install(){
cat <<INFO
Dendrite has been installed, you should now generate a new configuration and a private key files by running
dendrite-generate-config --dir "/var/lib/dendrite" | sudo -u dendrite tee "/etc/dendrite/config.yaml"
and then
sudo -u dendrite dendrite-generate-keys --private-key "/var/lib/dendrite/matrix_key.pem"
An example configuration file with comments can be found at
/etc/dendrite/config-example.yaml
You can start the Dentrite server by running
sudo systemctl start dendrite
INFO
}
post_upgrade(){
# notify about breaking changes from v1 to v2
# https://wiki.archlinux.org/title/PKGBUILD#install
if [[ $1 != 0.6* ]] && [[ $2 == 0.6* ]]; then
cat <<INFO
Dendrite is now using configuration v2, as it moved from Kafka to NATS Jetstream.
You are advised to backup your previous configuration located at
/etc/dendrite/config.yaml
and generate a new configuration by running
dendrite-generate-config --dir "/var/lib/dendrite" | sudo -u dendrite tee "/etc/dendrite/config.yaml"
INFO
fi
# tee cannot be used to replace the input file, mv is necessary
cat <<INFO
Dendrite has been updated, you should now update its configuration file by running
sudo -u dendrite bash
cd "/var/lib/dendrite"
dendrite-generate-config --normalise "/etc/dendrite/config.yaml" | tee "/etc/dendrite/config.yaml.new"
mv "/etc/dendrite/config.yaml" "/etc/dendrite/config.yaml.bkp"
mv "/etc/dendrite/config.new" "/etc/dendrite/config.yaml"
exit
sudo systemctl restart dendrite
INFO
}
|