diff --git a/check_services.sh b/check_services.sh new file mode 100644 index 000000000..f68365fad --- /dev/null +++ b/check_services.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +echo "########## time to check the services, this script must be run with an user able to manage services, someone with sudo rights for example" +sudo service postgresql status +sudo service mastodon-* status +echo "########## run: +sudo service mastodon-* restart + +and check that everything is working fine + +sudo journalctl -feu mastodon-* + +" diff --git a/update_dev.sh b/update_dev.sh new file mode 100644 index 000000000..f5a25c596 --- /dev/null +++ b/update_dev.sh @@ -0,0 +1,18 @@ +#!/bin/bash +## script must be run with the mastodon user + +echo "ruby version is": +ruby -v +echo "needed version is": +cat .ruby-version +echo "########## time to update mastodon. you need to pull your git branch before running this script." +git remote -v +git pull origin master +echo "########## install back end updates " +bundle install +bundle exec rake db:migrate +echo "########## install front end updates " +bundle exec rails assets:precompile +echo "########## check the services " +echo "########## now time to restart web services " +foreman start diff --git a/update_prod.sh b/update_prod.sh new file mode 100644 index 000000000..04c585af7 --- /dev/null +++ b/update_prod.sh @@ -0,0 +1,16 @@ +#!/bin/bash +## script must be run with the mastodon user +cd /home/mastodon/live/ +echo "ruby version is": +ruby -v +echo "needed version is": +cat .ruby-version +echo "########## time to update mastodon. you need to pull your git branch before running this script." +git remote -v +echo "########## install back end updates " +RAILS_ENV=production bundle install +RAILS_ENV=production bundle exec rake db:migrate +echo "########## install front end updates " +RAILS_ENV=production bundle exec rails assets:precompile +echo "########## check the services " +echo "########## now time to restart web services "