aboutsummaryrefslogtreecommitdiff
path: root/scripts/upgrade
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/upgrade')
-rw-r--r--scripts/upgrade10
1 files changed, 7 insertions, 3 deletions
diff --git a/scripts/upgrade b/scripts/upgrade
index ab4bf58..f19f3e7 100644
--- a/scripts/upgrade
+++ b/scripts/upgrade
@@ -37,10 +37,14 @@ sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/$app.conf
# Stop Mastodon Services
sudo systemctl stop mastodon-*.service
+# Change owner of live folder
+sudo chown -R $app: $final_path/live
+
# Download Mastodon
sudo su - $app <<PULLCOMMANDS
pushd ~/live
git fetch
+git reset --hard origin/master
git pull https://github.com/tootsuite/mastodon.git master
PULLCOMMANDS
@@ -58,6 +62,9 @@ RAILS_ENV=production bundle exec rails assets:precompile
RAILS_ENV=production bundle exec rails db:migrate
COMMANDS
+# Restart Mastodon
+sudo systemctl start mastodon-*.service
+
# Reload Nginx
sudo systemctl reload nginx
@@ -66,6 +73,3 @@ ynh_app_setting_set "$app" unprotected_uris "/"
# Reload SSOwat configuration
sudo yunohost app ssowatconf
-
-# Restart Mastodon
-sudo systemctl start mastodon-*.service