Initial
This commit is contained in:
commit
363a876c22
88 changed files with 783 additions and 0 deletions
4
ressources/mautrix-whatsapp/build
Executable file
4
ressources/mautrix-whatsapp/build
Executable file
|
@ -0,0 +1,4 @@
|
|||
#/bin/bash
|
||||
cd /tmp/whatsapp/
|
||||
git checkout $1
|
||||
PATH=$PATH:/usr/local/go/bin ./build.sh
|
3
ressources/mautrix-whatsapp/envinit
Executable file
3
ressources/mautrix-whatsapp/envinit
Executable file
|
@ -0,0 +1,3 @@
|
|||
#/bin/bash
|
||||
apt install -y ca-certificates git libolm3 libolm-dev build-essential wget
|
||||
wget -qO - https://go.dev/dl/go1.17.3.linux-amd64.tar.gz | tar -C /usr/local -xz
|
7
ressources/mautrix-whatsapp/makedeb
Normal file
7
ressources/mautrix-whatsapp/makedeb
Normal file
|
@ -0,0 +1,7 @@
|
|||
#!/bin/bash
|
||||
PATH_BUILD=$1
|
||||
PATH_DEB=$2
|
||||
GIT_VERSION=$3
|
||||
|
||||
cp ${PATH_BUILD}/tmp/whatsapp/mautrix-whatsapp ${PATH_DEB}/usr/lib/mautrix-whatsapp/mautrix-whatsapp
|
||||
cp ${PATH_BUILD}/tmp/whatsapp/example-config.yaml ${PATH_DEB}/etc/mautrix-whatsapp/config.yaml
|
6
ressources/mautrix-whatsapp/prebuild
Executable file
6
ressources/mautrix-whatsapp/prebuild
Executable file
|
@ -0,0 +1,6 @@
|
|||
#!/bin/bash
|
||||
VERSION=$1
|
||||
cd /tmp/
|
||||
git clone https://github.com/mautrix/whatsapp.git
|
||||
cd whatsapp/
|
||||
git checkout $VERSION
|
0
ressources/mautrix-whatsapp/rootfs/DEBIAN/changelog
Normal file
0
ressources/mautrix-whatsapp/rootfs/DEBIAN/changelog
Normal file
1
ressources/mautrix-whatsapp/rootfs/DEBIAN/conffiles
Normal file
1
ressources/mautrix-whatsapp/rootfs/DEBIAN/conffiles
Normal file
|
@ -0,0 +1 @@
|
|||
/etc/mautrix-whatsapp/config.yaml
|
8
ressources/mautrix-whatsapp/rootfs/DEBIAN/control
Normal file
8
ressources/mautrix-whatsapp/rootfs/DEBIAN/control
Normal file
|
@ -0,0 +1,8 @@
|
|||
Package: mautrix-whatsapp
|
||||
Version: %VERSION%
|
||||
Section: base
|
||||
Priority: optional
|
||||
Architecture: all
|
||||
Depends: libolm3
|
||||
Maintainer: Thomas Legay <thomas@syngate.fr>
|
||||
Description: mautrix-whatsapp bridge
|
4
ressources/mautrix-whatsapp/rootfs/DEBIAN/postinst
Executable file
4
ressources/mautrix-whatsapp/rootfs/DEBIAN/postinst
Executable file
|
@ -0,0 +1,4 @@
|
|||
#!/bin/bash
|
||||
|
||||
id mautrix-whatsapp &> /dev/null || useradd mautrix-whatsapp -r -s /bin/false -md /var/lib/mautrix-whatsapp
|
||||
chown mautrix-whatsapp:mautrix-whatsapp /etc/mautrix-whatsapp/
|
|
@ -0,0 +1,35 @@
|
|||
[Unit]
|
||||
Description=mautrix-whatsapp bridge
|
||||
|
||||
[Service]
|
||||
Type=exec
|
||||
User=mautrix-whatsapp
|
||||
WorkingDirectory=/var/lib/mautrix-whatsapp
|
||||
ExecStart=/usr/lib/mautrix-whatsapp/mautrix-whatsapp -c /etc/mautrix-whatsapp/config.yaml
|
||||
Restart=on-failure
|
||||
RestartSec=30s
|
||||
|
||||
# Optional hardening to improve security
|
||||
ReadWritePaths=/var/lib/mautrix-whatsapp /etc/mautrix-whatsapp
|
||||
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
|
Loading…
Add table
Add a link
Reference in a new issue