Initialize Git Repository: 'Stalwart'
All checks were successful
Stalwart (Bookworm) / Stalwart [arm64] (push) Successful in 44s
Stalwart (Bookworm) / Stalwart [amd64] (push) Successful in 53s
Stalwart (Noble) / Stalwart [arm64] (push) Successful in 44s
Stalwart (Noble) / Stalwart [amd64] (push) Successful in 50s
Stalwart (Trixie) / Stalwart [arm64] (push) Successful in 53s
Stalwart (Trixie) / Stalwart [amd64] (push) Successful in 53s

This commit is contained in:
Cantibra
2026-01-26 06:10:44 +01:00
commit 6691607a80
17 changed files with 1252 additions and 0 deletions

1
root/DEBIAN/conffiles Normal file
View File

@@ -0,0 +1 @@
/etc/stalwart.toml

10
root/DEBIAN/control Normal file
View File

@@ -0,0 +1,10 @@
Package: stalwart
Version: 0.15.4
Architecture:
Installed-Size:
Depends: openssl
Priority: optional
Section: misc
Homepage: http://www.privlab.it
Maintainer: PrivLab <repository@privlab.it>
Description: Stalwart Mail & Collaboration Server

55
root/DEBIAN/postinst Normal file
View File

@@ -0,0 +1,55 @@
#!/usr/bin/sh
set -e
set -u
if [ -d '/run/systemd/system' ]; then
/usr/bin/systemctl --system daemon-reload > '/dev/null' 2>&1 || \
/usr/bin/true
fi
case "${1}" in
configure)
if [ -x '/usr/bin/deb-systemd-helper' ]; then
/usr/bin/deb-systemd-helper unmask 'stalwart.service' > '/dev/null' 2>&1 || \
/usr/bin/true
fi
if /usr/bin/deb-systemd-helper --quiet was-enabled 'stalwart.service'; then
/usr/bin/deb-systemd-helper enable 'stalwart.service' > '/dev/null' 2>&1 || \
/usr/bin/true
else
/usr/bin/deb-systemd-helper update-state 'stalwart.service' > '/dev/null' 2>&1 || \
/usr/bin/true
fi
if [ -x '/etc/init.d/stalwart' ]; then
/usr/sbin/update-rc.d 'stalwart' defaults > '/dev/null' 2>&1 || \
/usr/bin/true
fi
/usr/bin/install --directory --group='stalwart' --mode='750' --owner='stalwart' '/var/lib/stalwart'
/usr/bin/install --directory --group='stalwart' --mode='750' --owner='stalwart' '/var/log/stalwart'
/usr/bin/install --directory --group='stalwart' --mode='750' --owner='stalwart' '/var/logrotate/stalwart'
if ! /usr/bin/grep --quiet "secret =" '/etc/stalwart.toml'; then
PASSWORD=$(/usr/bin/openssl rand -base64 '18')
PASSWORD_SHA512=$(/usr/bin/echo "${PASSWORD}" | /usr/bin/openssl passwd -noverify -stdin -quiet -6)
/usr/bin/echo "secret = \"${PASSWORD_SHA512}\"" > '/etc/stalwart.toml'
/ust/bin/chown 'stalwart' '/etc/stalwart.toml'
/usr/bin/echo '##'
/usr/bin/echo '##'
/usr/bin/echo '## User: root '
/usr/bin/echo "## Password: ${PASSWORD}"
/usr/bin/echo '##'
/usr/bin/echo '##'
fi
if [ -x '/usr/bin/deb-systemd-invoke' ]; then
/usr/bin/systemctl --system daemon-reload > '/dev/null' 2>&1 || \
/usr/bin/true
if [ -n "${2}" ]; then
_dh_action='restart'
else
_dh_action='start'
fi
/usr/bin/deb-systemd-invoke "${_dh_action}" 'stalwart.service' > '/dev/null' 2>&1 || \
/usr/bin/true
fi
;;
esac

36
root/DEBIAN/postrm Normal file
View File

@@ -0,0 +1,36 @@
#!/bin/sh
set -e
set -u
if [ -d '/run/systemd/system' ]; then
/usr/bin/systemctl --system daemon-reload > '/dev/null' 2>&1 || \
/usr/bin/true
fi
case "${1}" in
remove)
if [ -x '/usr/bin/deb-systemd-helper' ]; then
/usr/bin/deb-systemd-helper mask 'stalwart.service' > '/dev/null' 2>&1 || \
/usr/bin/true
fi
;;
purge)
if [ -x '/usr/bin/deb-systemd-helper' ]; then
/usr/bin/deb-systemd-helper purge 'stalwart.service' > '/dev/null' 2>&1 || \
/usr/bin/true
/usr/bin/deb-systemd-helper unmask 'stalwart.service' > '/dev/null' 2>&1 || \
/usr/bin/true
fi
if /usr/bin/getent passwd 'stalwart' > '/dev/null' 2>&1; then
/usr/sbin/deluser 'stalwart' > '/dev/null' 2>&1
fi
if /usr/bin/getent group 'stalwart' > '/dev/null' 2>&1; then
/usr/sbin/deluser --group 'stalwart' > '/dev/null' 2>&1
fi
/usr/bin/rm --force --recursive '/var/lib/stalwart'
;;
esac
/usr/bin/rm --force --recursive '/var/log/stalwart'
/usr/bin/rm --force --recursive '/var/logrotate/stalwart'

20
root/DEBIAN/preinst Normal file
View File

@@ -0,0 +1,20 @@
#!/usr/bin/sh
set -e
set -u
case "${1}" in
install)
if ! /usr/bin/getent passwd 'stalwart' > '/dev/null' 2>&1; then
/usr/sbin/adduser --quiet \
--system \
--home '/nonexistent' \
--shell '/usr/sbin/nologin' \
--no-create-home \
--group \
--disabled-password \
--disabled-login \
'stalwart' > '/dev/null' 2>&1
fi
;;
esac

19
root/DEBIAN/prerm Normal file
View File

@@ -0,0 +1,19 @@
#!/bin/sh
set -e
set -u
case "${1}" in
remove)
if [ -x '/usr/bin/deb-systemd-invoke' ]; then
/usr/bin/deb-systemd-invoke stop 'stalwart.service' > '/dev/null' 2>&1 || \
/usr/bin/true
/usr/bin/deb-systemd-invoke disable 'stalwart.service' > '/dev/null' 2>&1 || \
/usr/bin/true
fi
if [ -x '/etc/init.d/stalwart' ]; then
/usr/sbin/update-rc.d 'stalwart' remove > '/dev/null' 2>&1 || \
/usr/bin/true
fi
;;
esac