1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/ghost_ynh.git synced 2024-09-03 19:16:02 +02:00

Fix update script: file check

Instead of checking for the existence of a file, we were checking
if config.production.json was a directory! Obviously, this would
end up failing (unless you've done something very strange with
your Ghost setup).
This commit is contained in:
Badri 2022-08-12 14:11:15 +05:30
parent 61616f907d
commit 07f830d03b

View file

@ -92,7 +92,7 @@ then
tmpdir="$(mktemp -d)"
# Copy the admin saved settings from final path to tmp directory
if [ -d "$final_path/config.production.json" ]
if [ -f "$final_path/config.production.json" ]
then
# Old versions of Ghost store it here
cp -ar "$final_path/config.production.json" "$tmpdir/config.production.json"
@ -102,7 +102,7 @@ then
fi
# Backup the content folder to the temp dir
if [ -d "$final_path/config.production.json" ]
if [ -f "$final_path/config.production.json" ]
then
# Old versions of Ghost store it here
cp -ar "$final_path/content" "$tmpdir/content"