diff --git a/proxlb/debian/changelog b/proxlb/debian/changelog new file mode 100644 index 0000000..2094e58 --- /dev/null +++ b/proxlb/debian/changelog @@ -0,0 +1,5 @@ +python3-proxlb (1.1.0) unstable; urgency=medium + + * Initial release + + -- Florian Paul Azim Hoberg Tue, 04 Mar 2025 12:00:00 +0000 diff --git a/proxlb/debian/control b/proxlb/debian/control new file mode 100644 index 0000000..686a371 --- /dev/null +++ b/proxlb/debian/control @@ -0,0 +1,14 @@ +Source: python3-proxlb +Section: python +Priority: optional +Maintainer: Florian Paul Azim Hoberg +Build-Depends: debhelper-compat (= 13), python3, dh-python, python3-setuptools +Standards-Version: 4.6.0 +Homepage: https://github.com/gyptazy/ProxLB + +Package: python3-proxlb +Architecture: all +Depends: ${python3:Depends}, ${misc:Depends}, python3-proxmoxer, python3-systemd, python3-yaml, python3-urllib3, python3-requests +Description: Load balancer for Proxmox clusters + An advanced DRS alike loadbalancer for Proxmox clusters that also supports + maintenance modes and affinity/anti-affinity rules. diff --git a/proxlb/debian/copyright b/proxlb/debian/copyright new file mode 100644 index 0000000..535929c --- /dev/null +++ b/proxlb/debian/copyright @@ -0,0 +1,11 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: python3-proxlb +Source: https://github.com/gyptazy/ProxLB + +Files: * +Copyright: 2025 Florian Paul Azim Hoberg +License: GPL-3.0-or-later + +License: GPL-3.0-or-later + On Debian systems, the full text of the GPL-3.0-or-later license can be found + in the file /usr/share/common-licenses/GPL-3. \ No newline at end of file diff --git a/proxlb/debian/install b/proxlb/debian/install new file mode 100644 index 0000000..05b1451 --- /dev/null +++ b/proxlb/debian/install @@ -0,0 +1,5 @@ +main.py models usr/lib/python3/dist-packages/proxlb +models usr/lib/python3/dist-packages/proxlb +utils usr/lib/python3/dist-packages/proxlb +../service/proxlb.service lib/systemd/system +../config/proxlb_example.yaml etc/proxlb diff --git a/proxlb/debian/postinst b/proxlb/debian/postinst new file mode 100755 index 0000000..7ff9492 --- /dev/null +++ b/proxlb/debian/postinst @@ -0,0 +1,18 @@ +#!/bin/sh +set -e + +# Automatically inserted debhelper commands +#DEBHELPER# + +# Check if user proxlb exists, if not, create it +if ! id -u proxlb >/dev/null 2>&1; then + useradd -m proxlb + echo "User proxlb created." +else + echo "User proxlb already exists." +fi + +# Reload systemd +if [ "$1" = "configure" ]; then + systemd daemon-reload || exit 1 +fi diff --git a/proxlb/debian/prerm b/proxlb/debian/prerm new file mode 100755 index 0000000..e7d9255 --- /dev/null +++ b/proxlb/debian/prerm @@ -0,0 +1,11 @@ +#!/bin/sh +set -e + +# Automatically inserted debhelper commands +#DEBHELPER# + +if [ "$1" = "remove" ]; then + systemd proxlb stop || true + systemd disable proxlb.service || true + systemd daemon-reload +fi \ No newline at end of file diff --git a/proxlb/debian/rules b/proxlb/debian/rules new file mode 100755 index 0000000..9cb08f8 --- /dev/null +++ b/proxlb/debian/rules @@ -0,0 +1,3 @@ +#!/usr/bin/make -f +%: + dh $@ --with python3 diff --git a/proxlb/debian/source/format b/proxlb/debian/source/format new file mode 100644 index 0000000..89ae9db --- /dev/null +++ b/proxlb/debian/source/format @@ -0,0 +1 @@ +3.0 (native) diff --git a/service/proxlb.service b/service/proxlb.service index 9d44bd1..51fd8e4 100644 --- a/service/proxlb.service +++ b/service/proxlb.service @@ -1,11 +1,11 @@ [Unit] -Description=ProxLB - A loadbalancer for Proxmox clusters +Description=ProxLB - A load balancer for Proxmox clusters After=network-online.target Wants=network-online.target [Service] ExecStart=python3 /usr/lib/python3/dist-packages/proxlb/main.py -c /etc/proxlb/proxlb.yaml -User=plb +User=proxlb [Install] WantedBy=multi-user.target