Add avahi service for matrix
This commit is contained in:
parent
9f78c7df9f
commit
23fc305fb2
|
@ -597,6 +597,9 @@ function remove_matrix {
|
||||||
|
|
||||||
remove_completion_param install_matrix
|
remove_completion_param install_matrix
|
||||||
sed -i '/matrix/d' $COMPLETION_FILE
|
sed -i '/matrix/d' $COMPLETION_FILE
|
||||||
|
|
||||||
|
rm /etc/avahi/services/matrix.service
|
||||||
|
systemctl restart avahi-daemon
|
||||||
}
|
}
|
||||||
|
|
||||||
function install_home_server {
|
function install_home_server {
|
||||||
|
@ -802,5 +805,22 @@ function install_matrix {
|
||||||
|
|
||||||
set_completion_param "matrix domain" "$MATRIX_DOMAIN_NAME"
|
set_completion_param "matrix domain" "$MATRIX_DOMAIN_NAME"
|
||||||
|
|
||||||
|
# Add avahi services
|
||||||
|
echo '<?xml version="1.0" standalone="no"?><!--*-nxml-*-->' > /etc/avahi/services/matrix.service
|
||||||
|
echo '<!DOCTYPE service-group SYSTEM "avahi-service.dtd">' >> /etc/avahi/services/matrix.service
|
||||||
|
echo '<service-group>' >> /etc/avahi/services/matrix.service
|
||||||
|
echo ' <name replace-wildcards="yes">%h MATRIX</name>' >> /etc/avahi/services/matrix.service
|
||||||
|
echo ' <service>' >> /etc/avahi/services/matrix.service
|
||||||
|
echo ' <type>_matrix._tcp</type>' >> /etc/avahi/services/matrix.service
|
||||||
|
echo " <port>$MATRIX_HTTP_PORT</port>" >> /etc/avahi/services/matrix.service
|
||||||
|
echo ' </service>' >> /etc/avahi/services/matrix.service
|
||||||
|
echo ' <service>' >> /etc/avahi/services/matrix.service
|
||||||
|
echo ' <type>_matrix._udp</type>' >> /etc/avahi/services/matrix.service
|
||||||
|
echo " <port>$MATRIX_HTTP_PORT</port>" >> /etc/avahi/services/matrix.service
|
||||||
|
echo ' </service>' >> /etc/avahi/services/matrix.service
|
||||||
|
echo '</service-group>' >> /etc/avahi/services/matrix.service
|
||||||
|
|
||||||
|
systemctl restart avahi-daemon
|
||||||
|
|
||||||
APP_INSTALLED=1
|
APP_INSTALLED=1
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue