Add zigbee2mqtt

Add gotify (not work)
This commit is contained in:
root 2022-02-03 22:51:24 +01:00
parent 010f073bb0
commit ed80d22552
27 changed files with 181 additions and 24 deletions

View File

@ -13,17 +13,6 @@ allstep
### package are available without compilation ### package are available without compilation
#### vaultwarden
```bash
wget -qO - https://deb.lgy.fr/install.sh | bash
apt install vaultwarden vaultwarden-web
#Edit /etc/default/vaultwarden
systemctl enable --now vaultwarden
```
#### joplin server #### joplin server
```bash ```bash
@ -37,3 +26,26 @@ apt-get install -y joplin-server
systemctl enable --now joplin-server systemctl enable --now joplin-server
``` ```
#### vaultwarden
```bash
wget -qO - https://deb.lgy.fr/install.sh | bash
apt install vaultwarden vaultwarden-web
#Edit /etc/default/vaultwarden
systemctl enable --now vaultwarden
```
#### zigbee2mqtt
```bash
apt install -y wget ca-certificates
wget -qO - https://deb.lgy.fr/install.sh | bash
apt-get install -y zigbee2mqtt
#Edit /etc/zigbee2mqtt/configuration.yaml
systemctl enable --now zigbee2mqtt
```

View File

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
APP=element-web APP=element-web
VERSION=1.9.9 VERSION=1.10.1
GIT_VERSION=v$VERSION GIT_VERSION=v$VERSION
DEB_VERSION=$VERSION-2 DEB_VERSION=$VERSION-2
DEBIAN_VERSION_CODENAME=bullseye DEBIAN_VERSION_CODENAME=bullseye

10
gotify Executable file
View File

@ -0,0 +1,10 @@
#!/bin/bash
APP=gotify
VERSION=2.1.4
GIT_VERSION=v$VERSION
DEB_VERSION=$VERSION-1
DEBIAN_VERSION_CODENAME=bullseye
source ./lib/function.sh

View File

@ -1,9 +1,9 @@
#!/bin/bash #!/bin/bash
APP=joplin-server APP=joplin-server
VERSION=2.7.3 VERSION=2.7.4
GIT_VERSION=server-v$VERSION GIT_VERSION=server-v$VERSION
DEB_VERSION=$VERSION-1 DEB_VERSION=$VERSION-2
DEBIAN_VERSION_CODENAME=bullseye DEBIAN_VERSION_CODENAME=bullseye
source ./lib/function.sh source ./lib/function.sh

View File

@ -63,7 +63,7 @@ step4(){
step5(){ step5(){
rm -fr dist/${APP} rm -fr dist/${APP}
mkdir dist/${APP} mkdir dist/${APP}
cp -fr ressources/${APP}/rootfs/* dist/$APP/ cp -pfr ressources/${APP}/rootfs/* dist/$APP/
bash ressources/${APP}/makedeb ${CACHE_STEP4} dist/${APP} ${GIT_VERSION} bash ressources/${APP}/makedeb ${CACHE_STEP4} dist/${APP} ${GIT_VERSION}
sed -i "s/%VERSION%/$DEB_VERSION/" dist/${APP}/DEBIAN/control sed -i "s/%VERSION%/$DEB_VERSION/" dist/${APP}/DEBIAN/control
fakeroot dpkg-deb -Z gzip --build dist/${APP} dist fakeroot dpkg-deb -Z gzip --build dist/${APP} dist
@ -78,23 +78,36 @@ allstep(){
step5 step5
} }
StartFromStep1(){ DeleteStep1(){
rm -fr ${CACHE_STEP1} ${CACHE_STEP2} ${CACHE_STEP3} ${CACHE_STEP4} rm -fr ${CACHE_STEP1} ${CACHE_STEP2} ${CACHE_STEP3} ${CACHE_STEP4}
}
DeleteStep2(){
rm -fr ${CACHE_STEP2} ${CACHE_STEP3} ${CACHE_STEP4}
}
DeleteStep3(){
rm -fr ${CACHE_STEP3} ${CACHE_STEP4}
}
DeleteStep4(){
rm -fr ${CACHE_STEP4}
}
StartFromStep1(){
DeleteStep1
allstep allstep
} }
StartFromStep2(){ StartFromStep2(){
rm -fr ${CACHE_STEP2} ${CACHE_STEP3} ${CACHE_STEP4} DeleteStep2
allstep allstep
} }
StartFromStep3(){ StartFromStep3(){
rm -fr ${CACHE_STEP3} ${CACHE_STEP4} DeleteStep3
allstep allstep
} }
StartFromStep4(){ StartFromStep4(){
rm -fr ${CACHE_STEP4} DeleteStep4
allstep allstep
} }
@ -111,5 +124,15 @@ GotoStep3(){
} }
GotoStep4(){ GotoStep4(){
mount -t proc proc ${CACHE_STEP4}/proc/
chroot ${CACHE_STEP4} chroot ${CACHE_STEP4}
umount ${CACHE_STEP4}/proc/
}
Clean(){
rm -fr cache/*
}
CleanAll(){
rm -fr cache/*
} }

4
ressources/gotify/build Executable file
View File

@ -0,0 +1,4 @@
#!/bin/bash
cd /tmp/server/
. /root/.bashrc
PATH=$PATH:/usr/local/go/bin make

8
ressources/gotify/envinit Executable file
View File

@ -0,0 +1,8 @@
#/bin/bash
apt install -y build-essential git wget ca-certificates
wget -qO - https://deb.nodesource.com/setup_16.x | bash
wget -qO - https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor > /usr/share/keyrings/yarnkey.gpg
echo "deb [signed-by=/usr/share/keyrings/yarnkey.gpg] https://dl.yarnpkg.com/debian stable main" > /etc/apt/sources.list.d/yarn.list
apt-get update
apt-get install -y nodejs yarn
wget -qO - https://go.dev/dl/go1.17.6.linux-amd64.tar.gz | tar -C /usr/local -xz

View File

@ -0,0 +1,8 @@
#!/bin/bash
PATH_BUILD=$1
PATH_DEB=$2
GIT_VERSION=$3
cp ${PATH_BUILD}/tmp/gotify/dist/gotify ${PATH_DEB}/usr/bin/gotify
cp ${PATH_BUILD}/tmp/authelia/config.template.yml ${PATH_DEB}/etc/authelia/configuration.yml

6
ressources/gotify/prebuild Executable file
View File

@ -0,0 +1,6 @@
#!/bin/bash
VERSION=$1
cd /tmp/
git clone https://github.com/gotify/server.git
cd server/
git checkout $VERSION

View File

@ -0,0 +1 @@
/etc/authelia/configuration.yml

View File

@ -0,0 +1,7 @@
Package: gotify
Version: %VERSION%
Section: base
Priority: optional
Architecture: all
Maintainer: Thomas Legay <thomas@syngate.fr>
Description: gotify

View File

@ -0,0 +1,4 @@
#!/bin/bash
id authelia &> /dev/null || useradd authelia -r -s /bin/false

View File

@ -0,0 +1,13 @@
[Unit]
Description=gotify service
Documentation=https://github.com/gotify/server
After=network.target
[Service]
User=gotify
Group=gotify
ExecStart=/usr/bin/gotify-linux-amd64
WorkingDirectory=/usr/lib/gotify
[Install]
WantedBy=multi-user.target

View File

@ -2,7 +2,7 @@
id joplin-server &> /dev/null || useradd joplin-server -r -s /bin/false -md /var/lib/joplin-server id joplin-server &> /dev/null || useradd joplin-server -r -s /bin/false -md /var/lib/joplin-server
## issue https://github.com/laurent22/joplin/issues/5980 ## issue https://github.com/laurent22/joplin/issues/5980
mkdir /usr/lib/joplin-server/server/temp/ [ ! -e /usr/lib/joplin-server/server/temp/ ] && mkdir /usr/lib/joplin-server/server/temp/
mkdir /usr/lib/joplin-server/server/logs/ [ ! -e /usr/lib/joplin-server/server/logs/ ] && mkdir /usr/lib/joplin-server/server/logs/
chown joplin-server:joplin-server /usr/lib/joplin-server/server/temp/ chown joplin-server:joplin-server /usr/lib/joplin-server/server/temp/
chown joplin-server:joplin-server /usr/lib/joplin-server/server/logs/ chown joplin-server:joplin-server /usr/lib/joplin-server/server/logs/

4
ressources/zigbee2mqtt/build Executable file
View File

@ -0,0 +1,4 @@
#!/bin/bash
cd /tmp/zigbee2mqtt/
npm ci
npm run build

3
ressources/zigbee2mqtt/envinit Executable file
View File

@ -0,0 +1,3 @@
#/bin/bash
apt install -y wget ca-certificates nodejs npm git make g++ gcc

View File

@ -0,0 +1,8 @@
#!/bin/bash
PATH_BUILD=$1
PATH_DEB=$2
GIT_VERSION=$3
cp -fr ${PATH_BUILD}/tmp/zigbee2mqtt/data/configuration.yaml ${PATH_DEB}/etc/zigbee2mqtt/configuration.yaml
cp -fr ${PATH_BUILD}/tmp/zigbee2mqtt/* ${PATH_DEB}/usr/lib/zigbee2mqtt/

View File

@ -0,0 +1,6 @@
#!/bin/bash
VERSION=$1
cd /tmp/
git clone https://github.com/Koenkk/zigbee2mqtt.git
cd zigbee2mqtt/
git checkout $VERSION

View File

@ -0,0 +1 @@
/etc/zigbee2mqtt/configuration.yaml

View File

@ -0,0 +1,8 @@
Package: zigbee2mqtt
Version: %VERSION%
Section: base
Priority: optional
Architecture: all
Depends: nodejs, npm
Maintainer: Thomas Legay <thomas@syngate.fr>
Description: zigbee2mqtt

View File

@ -0,0 +1,4 @@
#!/bin/bash
id zigbee2mqtt &> /dev/null || useradd zigbee2mqtt -r -s /bin/false -md /var/lib/zigbee2mqtt
chown zigbee2mqtt:zigbee2mqtt /var/lib/zigbee2mqtt/

View File

@ -0,0 +1,2 @@
ZIGBEE2MQTT_CONFIG=/etc/zigbee2mqtt/configuration.yaml
ZIGBEE2MQTT_DATA=/var/lib/zigbee2mqtt

View File

@ -0,0 +1,16 @@
[Unit]
Description=zigbee2mqtt
After=network.target
[Service]
EnvironmentFile=/etc/default/zigbee2mqtt
ExecStart=/usr/bin/npm start
WorkingDirectory=/usr/lib/zigbee2mqtt
StandardOutput=inherit
StandardError=inherit
Restart=always
User=zigbee2mqtt
Group=zigbee2mqtt
[Install]
WantedBy=multi-user.target

View File

@ -1,9 +1,9 @@
#!/bin/bash #!/bin/bash
APP=vaultwarden APP=vaultwarden
VERSION=1.23.1 VERSION=1.24.0
GIT_VERSION=$VERSION GIT_VERSION=$VERSION
DEB_VERSION=$VERSION-3 DEB_VERSION=$VERSION-1
DEBIAN_VERSION_CODENAME=bullseye DEBIAN_VERSION_CODENAME=bullseye
source ./lib/function.sh source ./lib/function.sh

9
zigbee2mqtt2deb Executable file
View File

@ -0,0 +1,9 @@
#!/bin/bash
APP=zigbee2mqtt
VERSION=1.23.0
GIT_VERSION=$VERSION
DEB_VERSION=$VERSION-3
DEBIAN_VERSION_CODENAME=bullseye
source ./lib/function.sh