new version adguardhome element-web glpi grocy mautrix-whatsapp metabase rss-bridge tt-rss wallabag zigbee2mqtt
add rustdesk-server
This commit is contained in:
parent
ad8ebb543c
commit
f7730928e4
29 changed files with 272 additions and 59 deletions
55
ressources/rustdesk-server/debmaker
Executable file
55
ressources/rustdesk-server/debmaker
Executable file
|
@ -0,0 +1,55 @@
|
|||
#!/bin/bash
|
||||
|
||||
[ -e ./lib/function.sh ] && source ./lib/function.sh
|
||||
|
||||
APP=rustdesk-server
|
||||
VERSION=1.1.5
|
||||
GIT_VERSION=$VERSION
|
||||
DEB_VERSION=$VERSION-$(date +%Y%m%d%H%M)
|
||||
DEBIAN_VERSION_CODENAME=bullseye
|
||||
IMAGE_SIZE=5
|
||||
DEPOT=https://github.com/rustdesk/rustdesk-server.git
|
||||
|
||||
STEP="envinit prebuild build makedeb"
|
||||
|
||||
envinit() {
|
||||
apt-get update
|
||||
apt-get dist-upgrade -y
|
||||
apt install -y --no-install-recommends wget fakeroot dpkg ca-certificates build-essential git
|
||||
apt clean
|
||||
}
|
||||
|
||||
STEP="envinit prebuild build makedeb"
|
||||
|
||||
envinit() {
|
||||
apt-get update
|
||||
apt-get dist-upgrade -y
|
||||
apt install -y --no-install-recommends build-essential git wget fakeroot dpkg ca-certificates
|
||||
cd /tmp
|
||||
wget -qO - https://sh.rustup.rs > rustup
|
||||
bash rustup -qy
|
||||
apt clean
|
||||
}
|
||||
|
||||
prebuild(){
|
||||
[ -e /tmp/${APP} ] && rm -fr /tmp/${APP}
|
||||
git clone --depth 1 ${DEPOT} /tmp/${APP}
|
||||
}
|
||||
|
||||
build() {
|
||||
cd /tmp/${APP}
|
||||
source ~/.cargo/env
|
||||
cargo build --release
|
||||
}
|
||||
|
||||
makedeb(){
|
||||
PATH_DEB=/tmp/src/rustdesk-server-hbbs
|
||||
cp -fr //tmp/rustdesk-server/target/release/hbbs ${PATH_DEB}/usr/bin/
|
||||
sed -i "s/%VERSION%/$DEB_VERSION/" ${PATH_DEB}/DEBIAN/control
|
||||
fakeroot dpkg-deb -Z gzip --build ${PATH_DEB} /tmp/dist
|
||||
|
||||
PATH_DEB=/tmp/src/rustdesk-server-hbbr
|
||||
cp -fr //tmp/rustdesk-server/target/release/hbbr ${PATH_DEB}/usr/bin/
|
||||
sed -i "s/%VERSION%/$DEB_VERSION/" ${PATH_DEB}/DEBIAN/control
|
||||
fakeroot dpkg-deb -Z gzip --build ${PATH_DEB} /tmp/dist
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
Package: rustdesk-server-hbbr
|
||||
Version: %VERSION%
|
||||
Section: base
|
||||
Priority: optional
|
||||
Architecture: all
|
||||
Maintainer: Thomas Legay <thomas@syngate.fr>
|
||||
Description: rustdesk-server-hbbr
|
4
ressources/rustdesk-server/rustdesk-server-hbbr/DEBIAN/postinst
Executable file
4
ressources/rustdesk-server/rustdesk-server-hbbr/DEBIAN/postinst
Executable file
|
@ -0,0 +1,4 @@
|
|||
#!/bin/bash
|
||||
|
||||
id hbbr &> /dev/null || useradd hbbr -r -s /bin/false -md /var/lib/hbbr
|
||||
chown hbbr:hbbr /var/lib/hbbr
|
|
@ -0,0 +1,18 @@
|
|||
[Unit]
|
||||
Description=rustdesk-server-hbbs
|
||||
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
User=hbbr
|
||||
Group=hbbr
|
||||
ExecStart=/usr/bin/hbbr
|
||||
PrivateTmp=true
|
||||
PrivateDevices=true
|
||||
ProtectHome=true
|
||||
ProtectSystem=strict
|
||||
WorkingDirectory=/var/lib//hbbr/
|
||||
ReadWriteDirectories=/var/lib/hbbr/
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
|
@ -0,0 +1,7 @@
|
|||
Package: rustdesk-server-hbbs
|
||||
Version: %VERSION%
|
||||
Section: base
|
||||
Priority: optional
|
||||
Architecture: all
|
||||
Maintainer: Thomas Legay <thomas@syngate.fr>
|
||||
Description: rustdesk-server-hbbs
|
4
ressources/rustdesk-server/rustdesk-server-hbbs/DEBIAN/postinst
Executable file
4
ressources/rustdesk-server/rustdesk-server-hbbs/DEBIAN/postinst
Executable file
|
@ -0,0 +1,4 @@
|
|||
#!/bin/bash
|
||||
|
||||
id hbbs &> /dev/null || useradd hbbs -r -s /bin/false -md /var/lib/hbbs
|
||||
chown hbbs:hbbs /var/lib/hbbs
|
|
@ -0,0 +1,18 @@
|
|||
[Unit]
|
||||
Description=rustdesk-server-hbbs
|
||||
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
User=hbbs
|
||||
Group=hbbs
|
||||
ExecStart=/usr/bin/hbbs
|
||||
PrivateTmp=true
|
||||
PrivateDevices=true
|
||||
ProtectHome=true
|
||||
ProtectSystem=strict
|
||||
WorkingDirectory=/var/lib//hbbs/
|
||||
ReadWriteDirectories=/var/lib/hbbs/
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
Loading…
Add table
Add a link
Reference in a new issue