Debian Codegraph @

scripts/preinst.sh

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