Просмотр исходного кода

One more correction to RPM scriptlets

Christian Meis 4 лет назад
Родитель
Сommit
814690e66b
2 измененных файлов с 2 добавлено и 2 удалено
  1. 1 1
      scripts/postinst.sh
  2. 1 1
      scripts/preinst.sh

+ 1 - 1
scripts/postinst.sh

@@ -6,7 +6,7 @@ set -e
 #
 # TODO: This is only tested on Debian.
 #
-if [ "$1" = "configure" ] || [ "$1" -gt 1 ]; then
+if [ "$1" = "configure" ] || [ "$1" -ge 1 ]; then
   if [ -d /run/systemd/system ]; then
     # Create ntfy user/group
     id ntfy >/dev/null 2>&1 || useradd --system --no-create-home ntfy

+ 1 - 1
scripts/preinst.sh

@@ -1,7 +1,7 @@
 #!/bin/sh
 set -e
 
-if [ "$1" = "install" ] || [ "$1" = "upgrade" ] || [ "$1" -gt 1 ]; then
+if [ "$1" = "install" ] || [ "$1" = "upgrade" ] || [ "$1" -ge 1 ]; then
   # Migration of old to new config file name
   oldconfigfile="/etc/ntfy/config.yml"
   configfile="/etc/ntfy/server.yml"