makedeb


dendrite 0.12.0-2


A second-generation Matrix homeserver written in Go

Viewing /dendrite.install.

View raw.

Click here to go back to the Git tree for dendrite.

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
}