commit dc7c38c06123d7902016fb28c55400a1eaa82d7a parent 79c958ea90aee07d78b72ff7c15b2107f3df4700 Author: bohdan-potuzhnyi <bohdan.potuzhnyi@gmail.com> Date: Mon, 14 Apr 2025 15:45:06 +0200 reviewing debian update scripting Diffstat:
| M | debian/taler-merchant.postinst | | | 10 | +++++----- |
| M | debian/taler-merchant.prerm | | | 2 | +- |
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/debian/taler-merchant.postinst b/debian/taler-merchant.postinst @@ -62,14 +62,14 @@ configure) /etc/taler-merchant/secrets/merchant-db.secret.conf fi + if [ -x /usr/local/bin/taler-merchant-dbinit ]; then + /usr/local/bin/taler-merchant-dbinit >/dev/null 2>&1 || true + fi + if [ -f "$MARKER" ] && grep -q "enabled" "$MARKER"; then echo "taler-merchant-httpd was previously enabled, running DB config." - if [ -x /usr/local/bin/taler-merchant-dbconfig ]; then - /usr/local/bin/taler-merchant-dbconfig || true - fi - - systemctl start taler-merchant.target || true + systemctl enable --now taler-merchant.target || true else echo "Not enabling or starting Taler merchant services (marker not found or was 'disabled')." fi diff --git a/debian/taler-merchant.prerm b/debian/taler-merchant.prerm @@ -15,7 +15,7 @@ if [ -d /run/systemd/system ] && [ "$1" = upgrade ]; then echo "enabled" > "$MARKER" fi - deb-systemd-invoke stop 'taler-merchant*' >/dev/null || true + systemctl disable --now taler-merchant.target || true fi exit 0