add uptime-kuma
This commit is contained in:
parent
c42003ad1b
commit
8c08708c5b
11 changed files with 83 additions and 11 deletions
0
ressources/uptime-kuma/DEBIAN/changelog
Normal file
0
ressources/uptime-kuma/DEBIAN/changelog
Normal file
8
ressources/uptime-kuma/DEBIAN/control
Normal file
8
ressources/uptime-kuma/DEBIAN/control
Normal file
|
@ -0,0 +1,8 @@
|
|||
Package: uptime-kuma
|
||||
Version: %VERSION%
|
||||
Section: contrib
|
||||
Priority: optional
|
||||
Architecture: all
|
||||
Depends: nodejs
|
||||
Maintainer: Thomas Legay <thomas@lgy.fr>
|
||||
Description: uptime-kuma
|
7
ressources/uptime-kuma/DEBIAN/postinst
Executable file
7
ressources/uptime-kuma/DEBIAN/postinst
Executable file
|
@ -0,0 +1,7 @@
|
|||
#!/bin/bash
|
||||
APPUSER=uptime-kuma
|
||||
|
||||
id $APPUSER &> /dev/null || useradd $APPUSER -r -s /bin/false -d /var/lib/$APPUSER/
|
||||
|
||||
chown -R $APPUSER:$APPUSER /var/lib/$APPUSER/
|
||||
|
43
ressources/uptime-kuma/debmaker
Executable file
43
ressources/uptime-kuma/debmaker
Executable file
|
@ -0,0 +1,43 @@
|
|||
#!/bin/bash
|
||||
|
||||
VERSION=1.23.1
|
||||
APP=uptime-kuma
|
||||
GIT_VERSION=${VERSION}
|
||||
DEB_VERSION=$VERSION-$(date +%Y%m%d%H%M)
|
||||
DEPOT=https://github.com/louislam/uptime-kuma.git
|
||||
DEBIAN_VERSION_CODENAME=bookworm
|
||||
IMAGE_SIZE=10
|
||||
PACKAGE_DEPENDENCY="nodejs yarn build-essential"
|
||||
|
||||
main(){
|
||||
base_package_upgrade
|
||||
configure_depot_yarn
|
||||
configure_depot_nodejs
|
||||
install_package_dependency
|
||||
get_git_source
|
||||
build
|
||||
makedeb
|
||||
}
|
||||
|
||||
build() {
|
||||
cd /tmp/${APP}
|
||||
yarn
|
||||
yarn build
|
||||
}
|
||||
|
||||
makedeb(){
|
||||
PATH_DEB=/tmp/src/rootfs/
|
||||
cp -fr /tmp/src/DEBIAN $PATH_DEB
|
||||
|
||||
mkdir -p $PATH_DEB/usr/share/uptime-kuma/
|
||||
mkdir -p $PATH_DEB/var/lib/uptime-kuma/data
|
||||
|
||||
cp -fr /tmp/${APP}/{db,dist,node_modules,package.json,server,src} $PATH_DEB/usr/share/uptime-kuma/
|
||||
ln -s /var/lib/uptime-kuma/ $PATH_DEB/usr/share/uptime-kuma/data
|
||||
|
||||
mkdir -p ${PATH_DEB}/usr/lib/systemd/system/
|
||||
cp -p /tmp/src/uptime-kuma.service ${PATH_DEB}/usr/lib/systemd/system/
|
||||
|
||||
sed -i "s/%VERSION%/$DEB_VERSION/" ${PATH_DEB}/DEBIAN/control
|
||||
fakeroot dpkg-deb -Z gzip --build ${PATH_DEB} /tmp/dist
|
||||
}
|
13
ressources/uptime-kuma/uptime-kuma.service
Normal file
13
ressources/uptime-kuma/uptime-kuma.service
Normal file
|
@ -0,0 +1,13 @@
|
|||
[Unit]
|
||||
Description=linkding
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/bin/nodejs /var/lib/uptime-kuma/server/server.js
|
||||
WorkingDirectory=/var/lib/uptime-kuma
|
||||
Restart=always
|
||||
User=uptime-kuma
|
||||
Group=uptime-kuma
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
Loading…
Add table
Add a link
Reference in a new issue