preinst.sh 325 B

1234567891011
  1. #!/bin/sh
  2. set -e
  3. if [ "$1" = "install" ] || [ "$1" = "upgrade" ] || [ "$1" -ge 1 ]; then
  4. # Migration of old to new config file name
  5. oldconfigfile="/etc/ntfy/config.yml"
  6. configfile="/etc/ntfy/server.yml"
  7. if [ -f "$oldconfigfile" ] && [ ! -f "$configfile" ]; then
  8. mv "$oldconfigfile" "$configfile" || true
  9. fi
  10. fi