Compare commits
3 commits
34701b2a05
...
422b97bc1b
Author | SHA1 | Date | |
---|---|---|---|
422b97bc1b | |||
f6d0cbbeb7 | |||
9a779aafa3 |
8 changed files with 132 additions and 2 deletions
|
@ -1406,7 +1406,7 @@ account_threepid_delegates:
|
|||
#
|
||||
# Does not apply to server administrators. Defaults to 'true'
|
||||
#
|
||||
#enable_set_displayname: false
|
||||
enable_set_displayname: ${ENABLE_SET_DISPLAYNAME:?}
|
||||
|
||||
# Whether users are allowed to change their avatar after it has been
|
||||
# initially set. Useful when provisioning users based on the contents
|
||||
|
@ -1421,7 +1421,7 @@ account_threepid_delegates:
|
|||
#
|
||||
# Defaults to 'true'
|
||||
#
|
||||
#enable_3pid_changes: false
|
||||
enable_3pid_changes: ${ENABLE_3PID_CHANGES:?}
|
||||
|
||||
# Users who register on this homeserver will automatically be joined
|
||||
# to these rooms.
|
||||
|
|
|
@ -162,6 +162,12 @@ rc-login-burst
|
|||
registration-allows-email-pattern
|
||||
Only allow email addresses matching specified filter. Can be specified multiple times. A pattern must look like `.*@vector\.im`.
|
||||
|
||||
disable-displayname-changes
|
||||
Whether users are allowed to change their displayname after it has been initially set.
|
||||
|
||||
disable-3pid-changes
|
||||
Whether users can change the 3PIDs associated with their accounts (email address and msisdn).
|
||||
|
||||
auto-join-room
|
||||
Room where newly-registered users are automatically added. Can be specified multiple times.
|
||||
|
||||
|
|
|
@ -181,6 +181,18 @@ if [ -f "$__object/parameter/registration-requires-email" ]; then
|
|||
export REGISTRATION_REQUIRES_EMAIL=1
|
||||
fi
|
||||
|
||||
ENABLE_SET_DISPLAYNAME='true'
|
||||
if [ -f "$__object/parameter/disable-displayname-changes" ]; then
|
||||
ENABLE_SET_DISPLAYNAME='false'
|
||||
fi
|
||||
export ENABLE_SET_DISPLAYNAME
|
||||
|
||||
ENABLE_3PID_CHANGES='true'
|
||||
if [ -f "$__object/parameter/disable-3pid-changes" ]; then
|
||||
ENABLE_3PID_CHANGES='false'
|
||||
fi
|
||||
export ENABLE_3PID_CHANGES
|
||||
|
||||
if [ -f "$__object/parameter/auto-join-room" ]; then
|
||||
AUTO_JOIN_ROOMS="$(cat "$__object/parameter/auto-join-room")"
|
||||
export AUTO_JOIN_ROOMS
|
||||
|
|
|
@ -18,3 +18,5 @@ enable-message-retention-policy
|
|||
worker-mode
|
||||
enable-url-preview
|
||||
enable-3pid-lookups
|
||||
disable-3pid-changes
|
||||
disable-displayname-changes
|
||||
|
|
21
type/__systemd_resolved/gencode-remote
Executable file
21
type/__systemd_resolved/gencode-remote
Executable file
|
@ -0,0 +1,21 @@
|
|||
#!/bin/sh -e
|
||||
#
|
||||
# 2022 Joachim Desroches (joachim.desroches@epfl.ch)
|
||||
#
|
||||
# This file is part of cdist.
|
||||
#
|
||||
# cdist is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# cdist is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with cdist. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
echo "systemctl enable systemd-resolved"
|
47
type/__systemd_resolved/man.rst
Normal file
47
type/__systemd_resolved/man.rst
Normal file
|
@ -0,0 +1,47 @@
|
|||
cdist-type__systemd_resolved(7)
|
||||
===============================
|
||||
|
||||
NAME
|
||||
----
|
||||
cdist-type__systemd_resolved - Configure system to use systemd-resolved.
|
||||
|
||||
|
||||
DESCRIPTION
|
||||
-----------
|
||||
*systemd-resolved* is a systemd service that provides network name resolution
|
||||
to local applications via a D-Bus interface, the resolve NSS service
|
||||
(nss-resolve(8)), and a local DNS stub listener on 127.0.0.53.
|
||||
|
||||
This type enables and starts this type, and helps with some minimal
|
||||
configuration. In particular, systemd-resolved has four modes of handling the
|
||||
`/etc/resolv.conf` file: stub, static, uplink and foreign. See the
|
||||
systemd-resolved(8) manpage for details. By default, this type uses stub mode:
|
||||
if you need another one, please provide an implementation in this type!
|
||||
|
||||
|
||||
EXAMPLES
|
||||
--------
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
__systemd_resolved
|
||||
|
||||
|
||||
SEE ALSO
|
||||
--------
|
||||
`systemd.network`\ (5)
|
||||
`systemd-resolved`\ (8)
|
||||
`nss-resolve`\ (8)
|
||||
|
||||
|
||||
AUTHORS
|
||||
-------
|
||||
Joachim Desroches <joachim.desroches@epfl.ch>
|
||||
|
||||
|
||||
COPYING
|
||||
-------
|
||||
Copyright \(C) 2022 Joachim Desroches. You can redistribute it
|
||||
and/or modify it under the terms of the GNU General Public License as
|
||||
published by the Free Software Foundation, either version 3 of the
|
||||
License, or (at your option) any later version.
|
42
type/__systemd_resolved/manifest
Executable file
42
type/__systemd_resolved/manifest
Executable file
|
@ -0,0 +1,42 @@
|
|||
#!/bin/sh -e
|
||||
#
|
||||
# 2022 Joachim Desroches (joachim.desroches@epfl.ch)
|
||||
#
|
||||
# This file is part of cdist.
|
||||
#
|
||||
# cdist is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# cdist is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with cdist. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
os=$(cat "${__global:?}/explorer/os")
|
||||
|
||||
case "$os" in
|
||||
'debian')
|
||||
:
|
||||
;;
|
||||
*)
|
||||
printf "Your operating system (%s) is currently not supported by __systemd_resolved\n" "$os" >&2
|
||||
printf "Please contribute an implementation for it if you can.\n" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
__link /etc/resolv.conf \
|
||||
--type symbolic \
|
||||
--source ../run/systemd/resolve/stub-resolv.conf
|
||||
|
||||
require=__link/etc/resolv.conf \
|
||||
__systemd_service systemd-resolved \
|
||||
--state running \
|
||||
--action restart \
|
||||
--if-required
|
0
type/__systemd_resolved/singleton
Normal file
0
type/__systemd_resolved/singleton
Normal file
Loading…
Reference in a new issue