Update arch directory.
Update debian directory. Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
19
debian/README.md
vendored
19
debian/README.md
vendored
@@ -1,4 +1,4 @@
|
||||
# conduwuit for Debian
|
||||
# Tuwunel for Debian
|
||||
|
||||
Information about downloading and deploying the Debian package. This may also be
|
||||
referenced for other `apt`-based distros such as Ubuntu.
|
||||
@@ -13,17 +13,24 @@ No `apt` repository is currently offered yet, it is in the works/development.
|
||||
|
||||
### Configuration
|
||||
|
||||
When installed, the example config is placed at `/etc/conduwuit/conduwuit.toml`
|
||||
When installed, the example config is placed at `/etc/tuwunel/tuwunel.toml`
|
||||
as the default config. The config mentions things required to be changed before
|
||||
starting.
|
||||
|
||||
You can tweak more detailed settings by uncommenting and setting the config
|
||||
options in `/etc/conduwuit/conduwuit.toml`.
|
||||
options in `/etc/tuwunel/tuwunel.toml`.
|
||||
|
||||
### Running
|
||||
|
||||
The package uses the [`conduwuit.service`](../configuration/examples.md#example-systemd-unit-file) systemd unit file to start and stop conduwuit. The binary is installed at `/usr/sbin/conduwuit`.
|
||||
The package uses the [`tuwunel.service`](../configuration/examples.md#example-systemd-unit-file)
|
||||
systemd unit file to start and stop Tuwunel. The binary is installed at `/usr/sbin/tuwunel`.
|
||||
|
||||
This package assumes by default that conduwuit will be placed behind a reverse proxy. The default config options apply (listening on `localhost` and TCP port `6167`). Matrix federation requires a valid domain name and TLS, so you will need to set up TLS certificates and renewal for it to work properly if you intend to federate.
|
||||
This package assumes by default that Tuwunel will be placed behind a reverse
|
||||
proxy. The default config options apply (listening on `localhost` and TCP port
|
||||
`6167`). Matrix federation requires a valid domain name and TLS, so you will
|
||||
need to set up TLS certificates and renewal for it to work properly if you
|
||||
intend to federate.
|
||||
|
||||
Consult various online documentation and guides on setting up a reverse proxy and TLS. Caddy is documented at the [generic deployment guide](../deploying/generic.md#setting-up-the-reverse-proxy) as it's the easiest and most user friendly.
|
||||
Consult various online documentation and guides on setting up a reverse proxy
|
||||
and TLS. Caddy is documented at the [generic deployment guide](../deploying/generic.md#setting-up-the-reverse-proxy)
|
||||
as it's the easiest and most user friendly.
|
||||
|
||||
6
debian/config
vendored
6
debian/config
vendored
@@ -6,13 +6,13 @@ set -e
|
||||
#. /usr/share/debconf/confmodule
|
||||
#
|
||||
## Ask for the Matrix homeserver name, address and port.
|
||||
#db_input high conduwuit/hostname || true
|
||||
#db_input high tuwunel/hostname || true
|
||||
#db_go
|
||||
#
|
||||
#db_input low conduwuit/address || true
|
||||
#db_input low tuwunel/address || true
|
||||
#db_go
|
||||
#
|
||||
#db_input medium conduwuit/port || true
|
||||
#db_input medium tuwunel/port || true
|
||||
#db_go
|
||||
|
||||
exit 0
|
||||
|
||||
31
debian/postinst
vendored
31
debian/postinst
vendored
@@ -4,38 +4,41 @@ set -e
|
||||
# TODO: implement debconf support that is maintainable without duplicating the config
|
||||
#. /usr/share/debconf/confmodule
|
||||
|
||||
CONDUWUIT_DATABASE_PATH=/var/lib/conduwuit
|
||||
CONDUWUIT_CONFIG_PATH=/etc/conduwuit
|
||||
TUWUNEL_DATABASE_PATH=/var/lib/tuwunel
|
||||
TUWUNEL_CONFIG_PATH=/etc/tuwunel
|
||||
|
||||
case "$1" in
|
||||
configure)
|
||||
# Create the `conduwuit` user if it does not exist yet.
|
||||
if ! getent passwd conduwuit > /dev/null ; then
|
||||
echo 'Adding system user for the conduwuit Matrix homeserver' 1>&2
|
||||
# Create the `tuwunel` user if it does not exist yet.
|
||||
if ! getent passwd tuwunel > /dev/null ; then
|
||||
echo 'Adding system user for the tuwunel Matrix homeserver' 1>&2
|
||||
adduser --system --group --quiet \
|
||||
--home "$CONDUWUIT_DATABASE_PATH" \
|
||||
--home "$TUWUNEL_DATABASE_PATH" \
|
||||
--disabled-login \
|
||||
--shell "/usr/sbin/nologin" \
|
||||
conduwuit
|
||||
tuwunel
|
||||
fi
|
||||
|
||||
# Create the database path if it does not exist yet and fix up ownership
|
||||
# and permissions for the config.
|
||||
mkdir -v -p "$CONDUWUIT_DATABASE_PATH"
|
||||
mkdir -v -p "$TUWUNEL_DATABASE_PATH"
|
||||
|
||||
# symlink the previous location for compatibility if it does not exist yet.
|
||||
if ! test -L "/var/lib/matrix-conduit" ; then
|
||||
ln -s -v "$CONDUWUIT_DATABASE_PATH" "/var/lib/matrix-conduit"
|
||||
ln -s -v "$TUWUNEL_DATABASE_PATH" "/var/lib/matrix-conduit"
|
||||
fi
|
||||
if ! test -L "/var/lib/conduwuit" ; then
|
||||
ln -s -v "$TUWUNEL_DATABASE_PATH" "/var/lib/conduwuit"
|
||||
fi
|
||||
|
||||
chown -v conduwuit:conduwuit -R "$CONDUWUIT_DATABASE_PATH"
|
||||
chown -v conduwuit:conduwuit -R "$CONDUWUIT_CONFIG_PATH"
|
||||
chown -v tuwunel:tuwunel -R "$TUWUNEL_DATABASE_PATH"
|
||||
chown -v tuwunel:tuwunel -R "$TUWUNEL_CONFIG_PATH"
|
||||
|
||||
chmod -v 740 "$CONDUWUIT_DATABASE_PATH"
|
||||
chmod -v 740 "$TUWUNEL_DATABASE_PATH"
|
||||
|
||||
echo ''
|
||||
echo 'Make sure you edit the example config at /etc/conduwuit/conduwuit.toml before starting!'
|
||||
echo 'To start the server, run: systemctl start conduwuit.service'
|
||||
echo 'Make sure you edit the example config at /etc/tuwunel/tuwunel.toml before starting!'
|
||||
echo 'To start the server, run: systemctl start tuwunel.service'
|
||||
echo ''
|
||||
|
||||
;;
|
||||
|
||||
32
debian/postrm
vendored
32
debian/postrm
vendored
@@ -3,9 +3,10 @@ set -e
|
||||
|
||||
#. /usr/share/debconf/confmodule
|
||||
|
||||
CONDUWUIT_CONFIG_PATH=/etc/conduwuit
|
||||
CONDUWUIT_DATABASE_PATH=/var/lib/conduwuit
|
||||
CONDUWUIT_DATABASE_PATH_SYMLINK=/var/lib/matrix-conduit
|
||||
TUWUNEL_CONFIG_PATH=/etc/tuwunel
|
||||
TUWUNEL_DATABASE_PATH=/var/lib/tuwunel
|
||||
CONDUIT_DATABASE_PATH_SYMLINK=/var/lib/matrix-conduit
|
||||
CONDUWUIT_DATABASE_PATH_SYMLINK=/var/lib/conduwuit
|
||||
|
||||
case $1 in
|
||||
purge)
|
||||
@@ -18,23 +19,30 @@ case $1 in
|
||||
|
||||
#
|
||||
|
||||
if [ -d "$CONDUWUIT_CONFIG_PATH" ]; then
|
||||
if test -L "$CONDUWUIT_CONFIG_PATH"; then
|
||||
echo "Deleting conduwuit configuration files"
|
||||
rm -v -r "$CONDUWUIT_CONFIG_PATH"
|
||||
if [ -d "$TUWUNEL_CONFIG_PATH" ]; then
|
||||
if test -L "$TUWUNEL_CONFIG_PATH"; then
|
||||
echo "Deleting tuwunel configuration files"
|
||||
rm -v -r "$TUWUNEL_CONFIG_PATH"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -d "$CONDUWUIT_DATABASE_PATH" ]; then
|
||||
if test -L "$CONDUWUIT_DATABASE_PATH"; then
|
||||
echo "Deleting conduwuit database directory"
|
||||
rm -r "$CONDUWUIT_DATABASE_PATH"
|
||||
if [ -d "$TUWUNEL_DATABASE_PATH" ]; then
|
||||
if test -L "$TUWUNEL_DATABASE_PATH"; then
|
||||
echo "Deleting tuwunel database directory"
|
||||
rm -r "$TUWUNEL_DATABASE_PATH"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -d "$CONDUIT_DATABASE_PATH_SYMLINK" ]; then
|
||||
if test -L "$CONDUIT_DATABASE_SYMLINK"; then
|
||||
echo "Removing matrix-conduit symlink"
|
||||
rm -r "$CONDUIT_DATABASE_PATH_SYMLINK"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -d "$CONDUWUIT_DATABASE_PATH_SYMLINK" ]; then
|
||||
if test -L "$CONDUWUIT_DATABASE_SYMLINK"; then
|
||||
echo "Removing matrix-conduit symlink"
|
||||
echo "Removing conduwuit symlink"
|
||||
rm -r "$CONDUWUIT_DATABASE_PATH_SYMLINK"
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
[Unit]
|
||||
Description=conduwuit Matrix homeserver
|
||||
Description=Tuwunel Matrix homeserver
|
||||
Wants=network-online.target
|
||||
After=network-online.target
|
||||
Alias=matrix-conduwuit.service
|
||||
Documentation=https://conduwuit.puppyirl.gay/
|
||||
Alias=matrix-tuwunel.service
|
||||
Documentation=https://tuwunel.chat/
|
||||
|
||||
[Service]
|
||||
DynamicUser=yes
|
||||
User=conduwuit
|
||||
Group=conduwuit
|
||||
User=tuwunel
|
||||
Group=tuwunel
|
||||
Type=notify
|
||||
|
||||
Environment="CONDUWUIT_CONFIG=/etc/conduwuit/conduwuit.toml"
|
||||
Environment="TUWUNEL_CONFIG=/etc/tuwunel/tuwunel.toml"
|
||||
|
||||
ExecStart=/usr/sbin/conduwuit
|
||||
ExecStart=/usr/sbin/tuwunel
|
||||
|
||||
ReadWritePaths=/var/lib/conduwuit /etc/conduwuit
|
||||
ReadWritePaths=/var/lib/tuwunel /etc/tuwunel
|
||||
|
||||
AmbientCapabilities=
|
||||
CapabilityBoundingSet=
|
||||
@@ -48,9 +48,9 @@ SystemCallArchitectures=native
|
||||
SystemCallFilter=@system-service @resources
|
||||
SystemCallFilter=~@clock @debug @module @mount @reboot @swap @cpu-emulation @obsolete @timer @chown @setuid @privileged @keyring @ipc
|
||||
SystemCallErrorNumber=EPERM
|
||||
#StateDirectory=conduwuit
|
||||
#StateDirectory=tuwunel
|
||||
|
||||
RuntimeDirectory=conduwuit
|
||||
RuntimeDirectory=tuwunel
|
||||
RuntimeDirectoryMode=0750
|
||||
|
||||
Restart=on-failure
|
||||
Reference in New Issue
Block a user