diff --git a/debian/jitsi-meet-prosody.config b/debian/jitsi-meet-prosody.config new file mode 100644 index 0000000000..f5601b0a5f --- /dev/null +++ b/debian/jitsi-meet-prosody.config @@ -0,0 +1,4 @@ +#!/bin/sh -e + +# Source debconf library. +. /usr/share/debconf/confmodule diff --git a/debian/jitsi-meet-prosody.postinst b/debian/jitsi-meet-prosody.postinst index fccacf6c9f..7cadc28974 100644 --- a/debian/jitsi-meet-prosody.postinst +++ b/debian/jitsi-meet-prosody.postinst @@ -23,6 +23,15 @@ case "$1" in . /etc/jitsi/videobridge/config + # loading debconf + . /usr/share/debconf/confmodule + + # stores the hostname so we will reuse it later, like in purge + db_set jitsi-meet-prosody/jvb-hostname $JVB_HOSTNAME + + # and we're done with debconf + db_stop + PROSODY_CONFIG_PRESENT="true" PROSODY_HOST_CONFIG="/etc/prosody/conf.avail/$JVB_HOSTNAME.cfg.lua" # if there is no prosody config extract our template diff --git a/debian/jitsi-meet-prosody.postrm b/debian/jitsi-meet-prosody.postrm index 6d35b05b68..d4fa60469b 100644 --- a/debian/jitsi-meet-prosody.postrm +++ b/debian/jitsi-meet-prosody.postrm @@ -30,7 +30,7 @@ case "$1" in ;; purge) - db_get jitsi-meet/jvb-hostname + db_get jitsi-meet-prosody/jvb-hostname JVB_HOSTNAME=$RET if [ -n "$RET" ]; then rm -f /etc/prosody/conf.avail/$JVB_HOSTNAME.cfg.lua diff --git a/debian/jitsi-meet-prosody.templates b/debian/jitsi-meet-prosody.templates new file mode 100644 index 0000000000..aa46dab73e --- /dev/null +++ b/debian/jitsi-meet-prosody.templates @@ -0,0 +1,5 @@ +Template: jitsi-meet-prosody/jvb-hostname +Type: string +Default: ${default-key} +_Description: The hostname of the current installation: + The value for the hostname that is set in Jitsi Videobridge installation.