Fix build for vaultwarden 1.30.0

This commit is contained in:
Nico Isenbeck
2023-11-10 15:17:15 +01:00
parent 60bbdbf359
commit 2520b168b2
13 changed files with 136 additions and 95 deletions
+30 -8
View File
@@ -1,10 +1,32 @@
#!/bin/sh
if [ -f /etc/@@PACKAGEDIR@@/Rocket.toml ]
then
mv /etc/@@PACKAGEDIR@@/Rocket.toml /etc/@@PACKAGEDIR@@/Rocket.toml.deprecated
set -e
# Automatically added by dh_installsysusers/13.11.4
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
systemd-sysusers ${DPKG_ROOT:+--root="$DPKG_ROOT"} @@PACKAGEDIR@@.conf
fi
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
if [ -x "$(command -v systemd-tmpfiles)" ]; then
systemd-tmpfiles ${DPKG_ROOT:+--root="$DPKG_ROOT"} --create @@PACKAGEDIR@@.conf >/dev/null || true
fi
fi
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
if deb-systemd-helper --quiet is-enabled '@@PACKAGEDIR@@.service'; then
# Creates new symlinks on upgrades if the unit file has changed.
deb-systemd-helper enable '@@PACKAGEDIR@@.service' >/dev/null || true
else
# Update the statefile to add new symlinks (if any), which need to be
# cleaned up on purge. Also remove old symlinks.
deb-systemd-helper update-state '@@PACKAGEDIR@@.service' >/dev/null || true
fi
fi
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
if [ -d /run/systemd/system ]; then
systemctl --system daemon-reload >/dev/null || true
if systemctl --system is-active '@@PACKAGEDIR@@.service'; then
deb-systemd-invoke restart '@@PACKAGEDIR@@.service' >/dev/null || true
fi
fi
fi
DIR_MODE=0700 adduser --system --group --home /var/lib/@@PACKAGEDIR@@ @@SERVICEUSER@@
chmod 700 /var/lib/@@PACKAGEDIR@@
chmod 600 /etc/@@PACKAGEDIR@@/config.env
systemctl daemon-reload
systemctl restart vaultwarden.service