fix home path

This commit is contained in:
Antonio J. Delgado 2024-02-16 18:26:54 +02:00
parent 98f7a5f2d7
commit 0d1e12c6c9

View file

@ -75,7 +75,7 @@ else
fi
fi
mastodon_home="$(grep "^mastodon:" /etc/passwd | awk 'BEGIN {FS=":"} {print($6)}')/live"
mastodon_home="$(grep "^mastodon:" /etc/passwd | awk 'BEGIN {FS=":"} {print($6)}')"
if [ ! -d "${mastodon_home}" ]; then
printf "The home for the user mastodon '%s', doesn't exist." "${mastodon_home}"
exit 2
@ -84,7 +84,7 @@ fi
if [ "${DEBUG}" == "true" ]; then
echo "Changing to Mastodon's home directory '${mastodon_home}'..."
fi
cd "${mastodon_home}" || exit 3
cd "${mastodon_home}/live" || exit 3
current_tag=$(git name-rev --name-only HEAD | awk 'BEGIN {FS="/"} {print($2)}')
if [ "${current_tag}" != "${tag}" ]; then
if [ "${DEBUG}" == "true" ]; then