Add mautrix-syncproxy and mautrix-wsproxy
This commit is contained in:
parent
eaba9effe3
commit
51bcd703d6
13
README.MD
13
README.MD
|
@ -19,6 +19,7 @@ debmaker_run
|
||||||
- [gotify](#gotify)
|
- [gotify](#gotify)
|
||||||
- [grocy](#grocy)
|
- [grocy](#grocy)
|
||||||
- [joplin-server](#joplin-server)
|
- [joplin-server](#joplin-server)
|
||||||
|
- [mautrix-syncproxy and mautrix-wsproxy](#mautrix-syncproxy-and-mautrix-wsproxy)
|
||||||
- [rss-bridge](#rss-bridge)
|
- [rss-bridge](#rss-bridge)
|
||||||
- [tt-rss](#tt-rss)
|
- [tt-rss](#tt-rss)
|
||||||
- [vaultwarden and vaultwarden-web](#vaultwarden-and-vaultwarden-web)
|
- [vaultwarden and vaultwarden-web](#vaultwarden-and-vaultwarden-web)
|
||||||
|
@ -98,6 +99,18 @@ apt-get install -y joplin-server
|
||||||
systemctl enable --now joplin-server
|
systemctl enable --now joplin-server
|
||||||
```
|
```
|
||||||
|
|
||||||
|
#### mautrix-syncproxy and mautrix-wsproxy
|
||||||
|
```bash
|
||||||
|
apt install -y python wget ca-certificates
|
||||||
|
wget -qO - https://deb.lgy.fr/install.sh | bash
|
||||||
|
apt-get update
|
||||||
|
apt-get install -y mautrix-syncproxy mautrix-wsproxy
|
||||||
|
|
||||||
|
#Edit /etc/mautrix-wsproxy.yaml and /etc/default/mautrix-syncproxy
|
||||||
|
|
||||||
|
systemctl enable --now mautrix-wsproxy mautrix-syncproxy
|
||||||
|
```
|
||||||
|
|
||||||
#### rss-bridge
|
#### rss-bridge
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
APP=mautrix-syncproxy
|
||||||
|
VERSION=0.0.1
|
||||||
|
GIT_VERSION=$VERSION
|
||||||
|
DEB_VERSION=$VERSION-1
|
||||||
|
DEBIAN_VERSION_CODENAME=bullseye
|
||||||
|
IMAGE_SIZE=2
|
||||||
|
|
||||||
|
source ./lib/function.sh
|
|
@ -0,0 +1,10 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
APP=mautrix-wsproxy
|
||||||
|
VERSION=1.0.0
|
||||||
|
GIT_VERSION=$VERSION
|
||||||
|
DEB_VERSION=$VERSION-1
|
||||||
|
DEBIAN_VERSION_CODENAME=bullseye
|
||||||
|
IMAGE_SIZE=2
|
||||||
|
|
||||||
|
source ./lib/function.sh
|
|
@ -0,0 +1,29 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
STEP="envinit prebuild build makedeb"
|
||||||
|
|
||||||
|
envinit() {
|
||||||
|
apt install -y --no-install-recommends build-essential git wget ca-certificates dpkg fakeroot
|
||||||
|
wget -qO - https://go.dev/dl/go1.17.7.linux-amd64.tar.gz | tar -C /usr/local -xz
|
||||||
|
}
|
||||||
|
|
||||||
|
prebuild(){
|
||||||
|
GIT_VERSION=$1
|
||||||
|
git clone --depth 1 https://github.com/mautrix/syncproxy.git /tmp/mautrix-syncproxy
|
||||||
|
}
|
||||||
|
|
||||||
|
build() {
|
||||||
|
cd /tmp/mautrix-syncproxy/
|
||||||
|
PATH=$PATH:/usr/local/go/bin
|
||||||
|
go build -o mautrix-syncproxy
|
||||||
|
}
|
||||||
|
|
||||||
|
makedeb(){
|
||||||
|
GIT_VERSION=$1
|
||||||
|
DEB_VERSION=$2
|
||||||
|
PATH_DEB=/tmp/src/rootfs
|
||||||
|
|
||||||
|
cp /tmp/mautrix-syncproxy/mautrix-syncproxy ${PATH_DEB}/usr/bin/mautrix-syncproxy
|
||||||
|
sed -i "s/%VERSION%/$DEB_VERSION/" ${PATH_DEB}/DEBIAN/control
|
||||||
|
fakeroot dpkg-deb -Z gzip --build ${PATH_DEB} /tmp/dist
|
||||||
|
}
|
|
@ -0,0 +1 @@
|
||||||
|
/etc/default/mautrix-syncproxy
|
|
@ -0,0 +1,7 @@
|
||||||
|
Package: mautrix-syncproxy
|
||||||
|
Version: %VERSION%
|
||||||
|
Section: base
|
||||||
|
Priority: optional
|
||||||
|
Architecture: all
|
||||||
|
Maintainer: Thomas Legay <thomas@syngate.fr>
|
||||||
|
Description: mautrix-syncproxy
|
|
@ -0,0 +1,4 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
id mautrix-syncproxy &> /dev/null || useradd mautrix-syncproxy -r -s /bin/false -d /
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
DATABASE_URL=postgres://syncproxy:xxxxxxxxxx@postgres/syncproxy
|
||||||
|
HOMESERVER_URL=https://domaine.fr/
|
||||||
|
LISTEN_ADDRESS=:29331
|
||||||
|
SHARED_SECRET=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||||
|
#DEBUG=true
|
|
@ -0,0 +1,37 @@
|
||||||
|
[Unit]
|
||||||
|
Description=service mautrix-syncproxy
|
||||||
|
Documentation=https://github.com/mautrix/syncproxy
|
||||||
|
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
User=mautrix-syncproxy
|
||||||
|
Group=mautrix-syncproxy
|
||||||
|
EnvironmentFile=/etc/default/mautrix-syncproxy
|
||||||
|
ExecStart=/usr/bin/mautrix-syncproxy
|
||||||
|
WorkingDirectory=/tmp
|
||||||
|
Restart=on-failure
|
||||||
|
RestartSec=30s
|
||||||
|
#ReadWritePaths=/tmp
|
||||||
|
NoNewPrivileges=yes
|
||||||
|
MemoryDenyWriteExecute=true
|
||||||
|
PrivateDevices=yes
|
||||||
|
PrivateTmp=yes
|
||||||
|
ProtectHome=yes
|
||||||
|
ProtectSystem=strict
|
||||||
|
ProtectControlGroups=true
|
||||||
|
RestrictSUIDSGID=true
|
||||||
|
RestrictRealtime=true
|
||||||
|
LockPersonality=true
|
||||||
|
ProtectKernelLogs=true
|
||||||
|
ProtectKernelTunables=true
|
||||||
|
ProtectHostname=true
|
||||||
|
ProtectKernelModules=true
|
||||||
|
PrivateUsers=true
|
||||||
|
ProtectClock=true
|
||||||
|
SystemCallArchitectures=native
|
||||||
|
SystemCallErrorNumber=EPERM
|
||||||
|
SystemCallFilter=@system-service
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
|
@ -0,0 +1,30 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
STEP="envinit prebuild build makedeb"
|
||||||
|
|
||||||
|
envinit() {
|
||||||
|
apt install -y --no-install-recommends build-essential git wget ca-certificates dpkg fakeroot
|
||||||
|
wget -qO - https://go.dev/dl/go1.17.7.linux-amd64.tar.gz | tar -C /usr/local -xz
|
||||||
|
}
|
||||||
|
|
||||||
|
prebuild(){
|
||||||
|
GIT_VERSION=$1
|
||||||
|
git clone --depth 1 https://github.com/mautrix/wsproxy.git /tmp/mautrix-wsproxy
|
||||||
|
}
|
||||||
|
|
||||||
|
build() {
|
||||||
|
cd /tmp/mautrix-wsproxy/
|
||||||
|
PATH=$PATH:/usr/local/go/bin
|
||||||
|
go build -o mautrix-wsproxy
|
||||||
|
}
|
||||||
|
|
||||||
|
makedeb(){
|
||||||
|
GIT_VERSION=$1
|
||||||
|
DEB_VERSION=$2
|
||||||
|
PATH_DEB=/tmp/src/rootfs
|
||||||
|
|
||||||
|
cp /tmp/mautrix-wsproxy/mautrix-wsproxy ${PATH_DEB}/usr/bin/mautrix-wsproxy
|
||||||
|
cp /tmp/mautrix-wsproxy/example-config.yaml ${PATH_DEB}/etc/mautrix-wsproxy.yaml
|
||||||
|
sed -i "s/%VERSION%/$DEB_VERSION/" ${PATH_DEB}/DEBIAN/control
|
||||||
|
fakeroot dpkg-deb -Z gzip --build ${PATH_DEB} /tmp/dist
|
||||||
|
}
|
|
@ -0,0 +1 @@
|
||||||
|
/etc/mautrix-wsproxy.yaml
|
|
@ -0,0 +1,7 @@
|
||||||
|
Package: mautrix-wsproxy
|
||||||
|
Version: %VERSION%
|
||||||
|
Section: base
|
||||||
|
Priority: optional
|
||||||
|
Architecture: all
|
||||||
|
Maintainer: Thomas Legay <thomas@syngate.fr>
|
||||||
|
Description: mautrix-wsproxy
|
|
@ -0,0 +1,4 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
id mautrix-wsproxy &> /dev/null || useradd mautrix-wsproxy -r -s /bin/false -d /
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
[Unit]
|
||||||
|
Description=wsproxy
|
||||||
|
Documentation=https://github.com/mautrix/wsproxy
|
||||||
|
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
User=mautrix-wsproxy
|
||||||
|
Group=mautrix-wsproxy
|
||||||
|
ExecStart=/usr/bin/mautrix-wsproxy --config /etc/mautrix-wsproxy.yaml
|
||||||
|
WorkingDirectory=/tmp
|
||||||
|
Restart=on-failure
|
||||||
|
RestartSec=60
|
||||||
|
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
|
@ -9,4 +9,9 @@
|
||||||
AllowOverride all
|
AllowOverride all
|
||||||
Require all granted
|
Require all granted
|
||||||
</directory>
|
</directory>
|
||||||
|
|
||||||
|
<Directory /usr/share/tt-rss/cache>
|
||||||
|
Require all denied
|
||||||
|
</Directory>
|
||||||
|
|
||||||
</VirtualHost>
|
</VirtualHost>
|
||||||
|
|
Loading…
Reference in New Issue