Make chown actually ignore ./public/system and handle symlinks

This commit is contained in:
Anthony Wang 2023-07-08 03:03:44 +00:00
parent 176e7a43ce
commit f35b3575ac
Signed by: a
GPG key ID: 42A5B952E6DD8D38

View file

@ -15,7 +15,7 @@ post_upgrade() {
cd /var/lib/mastodon
echo "Setting ownership of mastodon files"
find -path public/system -prune -o -exec chown mastodon:mastodon {} +
find -path ./public/system -prune -o -exec chown -h mastodon:mastodon {} +
echo "Refreshing bundle"
sudo -u mastodon RAILS_ENV=production NODE_OPTIONS=--openssl-legacy-provider bundle install --redownload --standalone
echo "Upgrading database schema"