1
0
Fork 0
forked from mirrors/ntfy
ntfy/scripts/preinst.sh

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

12 lines
325 B
Bash
Raw Permalink Normal View History

2021-12-19 03:02:36 +00:00
#!/bin/sh
set -e
2022-01-05 15:00:27 +00:00
if [ "$1" = "install" ] || [ "$1" = "upgrade" ] || [ "$1" -ge 1 ]; then
2021-12-19 03:02:36 +00:00
# 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