From 9b2ddabca9130d61d67fc41dc43fe0ea24075290 Mon Sep 17 00:00:00 2001 From: Christian Meis Date: Wed, 5 Jan 2022 15:47:24 +0100 Subject: [PATCH] Corrected RPM scriptlets to actually restart the systemd service on a package upgrade. --- scripts/postinst.sh | 2 +- scripts/preinst.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/postinst.sh b/scripts/postinst.sh index 1a3b276..55752ea 100755 --- a/scripts/postinst.sh +++ b/scripts/postinst.sh @@ -6,7 +6,7 @@ set -e # # TODO: This is only tested on Debian. # -if [ "$1" = "configure" ] || [ "$1" = "1" ]; then +if [ "$1" = "configure" ] || [ "$1" -gt 1 ]; then if [ -d /run/systemd/system ]; then # Create ntfy user/group id ntfy >/dev/null 2>&1 || useradd --system --no-create-home ntfy diff --git a/scripts/preinst.sh b/scripts/preinst.sh index 6918a14..805cd2b 100755 --- a/scripts/preinst.sh +++ b/scripts/preinst.sh @@ -1,7 +1,7 @@ #!/bin/sh set -e -if [ "$1" = "install" ] || [ "$1" = "upgrade" ] || [ "$1" = "1" ]; then +if [ "$1" = "install" ] || [ "$1" = "upgrade" ] || [ "$1" -gt 1 ]; then # Migration of old to new config file name oldconfigfile="/etc/ntfy/config.yml" configfile="/etc/ntfy/server.yml"