1
0
Fork 0
mirror of https://github.com/binwiederhier/ntfy.git synced 2024-11-23 11:49:19 +01:00
ntfy/scripts/preinst.sh
2022-11-11 17:09:36 +01:00

11 lines
325 B
Bash
Executable file

#!/bin/sh
set -e
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"
if [ -f "$oldconfigfile" ] && [ ! -f "$configfile" ]; then
mv "$oldconfigfile" "$configfile" || true
fi
fi