From 8b811b73436e64fee016e2a8f18a6e49601287cf Mon Sep 17 00:00:00 2001 From: magikcypress Date: Sun, 16 Apr 2017 16:12:21 +0200 Subject: [PATCH 01/35] [enh] Create user + administrator --- scripts/.fonctions | 7 +++++++ scripts/install | 24 +++++++++++++++++++++--- 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/scripts/.fonctions b/scripts/.fonctions index 0a148a6..8013e27 100644 --- a/scripts/.fonctions +++ b/scripts/.fonctions @@ -110,6 +110,13 @@ SETUP_SOURCE () { # Download source, decompress and copu into $final_path fi } +# Create user with special hack +CREATE_USER () { + sudo curl -kSs https://${domain}/auth/sign_up --cookie-jar cookie | grep csrf > token || true + token=$(sudo cat token | sed -n '/csrf-token/s/.*name="csrf-token"\s\+content="\([^"]\+\).*/\1/p') + sudo curl -kSs https://${domain}/auth --data "&user[account_attributes][username]=${admin_mastodon}&user[email]=${admin_mastodon}@${domain}&user[password]=${admin_pass}&user[password_confirmation]=${admin_pass}&authenticity_token=${token}" --cookie cookie +} + ### REMOVE SCRIPT REMOVE_NGINX_CONF () { # Delete nginx configuration diff --git a/scripts/install b/scripts/install index b78cb47..caeec25 100644 --- a/scripts/install +++ b/scripts/install @@ -188,8 +188,6 @@ sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/$app.conf # Install crontab sudo cp ../conf/crontab_mastodon /etc/cron.d/$app sudo sed -i "s@__APP__@$app@g" /etc/cron.d/$app -# Restart crontab -sudo systemctl restart cron # Private or not if [ "$is_public" = "Yes" ]; @@ -208,4 +206,24 @@ fi sudo yunohost app ssowatconf # Reload Nginx -sudo systemctl reload nginx \ No newline at end of file +sudo systemctl reload nginx + +# all services start, please +sleep 30 + +# Mastodon need a user for creating an administator account +# rake create user is not up for the moment +# See PR: https://github.com/tootsuite/mastodon/pull/1482 +CREATE_USER + +# Create admin user +# Create confirm email +sudo su - $app < Date: Fri, 21 Apr 2017 14:29:37 +0200 Subject: [PATCH 02/35] Acl for Postgres user dump --- scripts/restore | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/restore b/scripts/restore index f754d81..80233af 100644 --- a/scripts/restore +++ b/scripts/restore @@ -81,6 +81,9 @@ sudo su -c "psql" postgres <<< \ sudo su -c "psql" postgres <<< \ "update pg_database set datistemplate='true' where datname='template1';" +# Acl for Postgres user dump +sudo setfacl -R -m u:postgres:r $YNH_APP_BACKUP_DIR || true + # Restore db ynh_psql_create_db_without_password "$app" sudo su - postgres < Date: Mon, 24 Apr 2017 23:52:44 +0200 Subject: [PATCH 03/35] [fix] Stop streaming service --- scripts/remove | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/remove b/scripts/remove index 6ddf97b..373d028 100644 --- a/scripts/remove +++ b/scripts/remove @@ -32,7 +32,7 @@ fi # Stop mastodon-sidekiq if [ -e "/etc/systemd/system/mastodon-streaming.service" ]; then echo "Delete systemd script" - sudo systemctl stop mastodon-sidekiq.streaming + sudo systemctl stop mastodon-streaming.service ynh_secure_remove "/etc/systemd/system/mastodon-streaming.service" sudo systemctl disable mastodon-streaming.service fi From 3604622ae5400c7d757943d70cf528904149dbdf Mon Sep 17 00:00:00 2001 From: nemsia Date: Tue, 25 Apr 2017 00:04:58 +0200 Subject: [PATCH 04/35] [fix] replace setfact by chmod --- scripts/restore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/restore b/scripts/restore index 80233af..a0498f0 100644 --- a/scripts/restore +++ b/scripts/restore @@ -82,7 +82,7 @@ sudo su -c "psql" postgres <<< \ "update pg_database set datistemplate='true' where datname='template1';" # Acl for Postgres user dump -sudo setfacl -R -m u:postgres:r $YNH_APP_BACKUP_DIR || true +sudo chmod o+r $YNH_APP_BACKUP_DIR/mastodon_db.sql || true # Restore db ynh_psql_create_db_without_password "$app" From fadf3e03b9361e04d55ca738fdff8ce7a71ac906 Mon Sep 17 00:00:00 2001 From: nemsia Date: Tue, 25 Apr 2017 12:46:21 +0200 Subject: [PATCH 05/35] [fix] Chmod .sql --- scripts/restore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/restore b/scripts/restore index a0498f0..c7e380c 100644 --- a/scripts/restore +++ b/scripts/restore @@ -82,7 +82,7 @@ sudo su -c "psql" postgres <<< \ "update pg_database set datistemplate='true' where datname='template1';" # Acl for Postgres user dump -sudo chmod o+r $YNH_APP_BACKUP_DIR/mastodon_db.sql || true +sudo chmod a+rx $YNH_APP_BACKUP_DIR/mastodon_db.sql || true # Restore db ynh_psql_create_db_without_password "$app" From d15d28745678bc9a9e9bf285988b83e3cb534bf4 Mon Sep 17 00:00:00 2001 From: nemsia Date: Tue, 25 Apr 2017 14:46:40 +0200 Subject: [PATCH 06/35] [fix] Acl backup directory --- scripts/restore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/restore b/scripts/restore index c7e380c..414a5f5 100644 --- a/scripts/restore +++ b/scripts/restore @@ -82,7 +82,8 @@ sudo su -c "psql" postgres <<< \ "update pg_database set datistemplate='true' where datname='template1';" # Acl for Postgres user dump -sudo chmod a+rx $YNH_APP_BACKUP_DIR/mastodon_db.sql || true +sudo chmod a+rx $YNH_APP_BACKUP_DIR +sudo chmod a+rx $YNH_APP_BACKUP_DIR/mastodon_db.sql # Restore db ynh_psql_create_db_without_password "$app" From 5850d816620c8b6c1664f0c478321570591f9118 Mon Sep 17 00:00:00 2001 From: nemsia Date: Tue, 25 Apr 2017 21:21:11 +0200 Subject: [PATCH 07/35] [fix] Copy dump in $finalpath --- scripts/restore | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/scripts/restore b/scripts/restore index 414a5f5..f931f0d 100644 --- a/scripts/restore +++ b/scripts/restore @@ -81,16 +81,18 @@ sudo su -c "psql" postgres <<< \ sudo su -c "psql" postgres <<< \ "update pg_database set datistemplate='true' where datname='template1';" -# Acl for Postgres user dump -sudo chmod a+rx $YNH_APP_BACKUP_DIR -sudo chmod a+rx $YNH_APP_BACKUP_DIR/mastodon_db.sql +# Copy postgresql dump +sudo cp $YNH_APP_BACKUP_DIR/mastodon_db.sql $final_path # Restore db ynh_psql_create_db_without_password "$app" sudo su - postgres < Date: Wed, 26 Apr 2017 10:40:39 +0200 Subject: [PATCH 08/35] [fix] Chmod on backup/tmp --- scripts/restore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/restore b/scripts/restore index f931f0d..8d0df6a 100644 --- a/scripts/restore +++ b/scripts/restore @@ -70,6 +70,8 @@ sudo cp -a ./sources "$final_path" # Set permissions sudo chown -R $app: "$final_path" +sudo chmod -R a+rx /home/yunohost.backup/tmp + # Set UTF8 encoding by default sudo su -c "psql" postgres <<< \ From ed08bd31ad591bbae6fbd66f910ccf0d129738ef Mon Sep 17 00:00:00 2001 From: nemsia Date: Wed, 26 Apr 2017 13:52:17 +0200 Subject: [PATCH 09/35] [fix] Add restart postgre --- scripts/restore | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/restore b/scripts/restore index 8d0df6a..65a4af8 100644 --- a/scripts/restore +++ b/scripts/restore @@ -88,6 +88,7 @@ sudo cp $YNH_APP_BACKUP_DIR/mastodon_db.sql $final_path # Restore db ynh_psql_create_db_without_password "$app" +sudo systemctl restart postgresql sudo su - postgres < Date: Wed, 26 Apr 2017 16:12:34 +0200 Subject: [PATCH 10/35] [fix] PG restore --- scripts/restore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/restore b/scripts/restore index 65a4af8..7820e04 100644 --- a/scripts/restore +++ b/scripts/restore @@ -90,7 +90,7 @@ sudo cp $YNH_APP_BACKUP_DIR/mastodon_db.sql $final_path ynh_psql_create_db_without_password "$app" sudo systemctl restart postgresql sudo su - postgres < Date: Thu, 27 Apr 2017 22:34:49 +0200 Subject: [PATCH 11/35] [enh] Install tagged release --- scripts/install | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/install b/scripts/install index ed2b1e7..67e69b0 100644 --- a/scripts/install +++ b/scripts/install @@ -87,6 +87,8 @@ sudo su - $app < Date: Fri, 28 Apr 2017 11:42:08 +0200 Subject: [PATCH 12/35] [fix] Replace pushd by cd on upgrade --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 655f22f..076e3fb 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -39,7 +39,7 @@ sudo systemctl stop mastodon-*.service # Update Mastodon sudo su - $app < Date: Fri, 28 Apr 2017 13:30:04 +0200 Subject: [PATCH 13/35] [enh] Install tagged releases --- scripts/install | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/install b/scripts/install index ed2b1e7..67e69b0 100644 --- a/scripts/install +++ b/scripts/install @@ -87,6 +87,8 @@ sudo su - $app < Date: Fri, 28 Apr 2017 18:02:28 +0200 Subject: [PATCH 14/35] [fix] Install tagged release --- scripts/install | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index 67e69b0..d58f08e 100644 --- a/scripts/install +++ b/scripts/install @@ -82,12 +82,13 @@ sudo su -c "psql" postgres <<< \ ynh_psql_create_db_without_password "$app" sudo systemctl restart postgresql -# Download all Ruby source +# Download all sources rbenv, ruby and mastodon +pushd $final_path/live sudo su - $app < Date: Fri, 28 Apr 2017 18:07:45 +0200 Subject: [PATCH 15/35] [fix] Upgrade on tagged release --- scripts/upgrade | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 076e3fb..bd9c46a 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -38,8 +38,9 @@ sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/$app.conf sudo systemctl stop mastodon-*.service # Update Mastodon +pushd /opt/mastodon/live sudo su - $app < Date: Fri, 28 Apr 2017 18:37:00 +0200 Subject: [PATCH 16/35] [fix] Error on upgrade with yarn.lock --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index bd9c46a..f909d05 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -45,7 +45,7 @@ git fetch git pull https://github.com/tootsuite/mastodon.git master git checkout $(git tag | tail -n 1) bin/bundle install -yarn install --production +yarn install --pure-lockfile RAILS_ENV=production bundle exec rails assets:clean RAILS_ENV=production bundle exec rails assets:precompile RAILS_ENV=production bundle exec rails db:migrate From 1e9438883eaacd698eafe2a62a8906c595328975 Mon Sep 17 00:00:00 2001 From: nemsia Date: Fri, 28 Apr 2017 18:54:02 +0200 Subject: [PATCH 17/35] upgrade on master --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index f909d05..e3afa94 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -43,7 +43,7 @@ sudo su - $app < Date: Sat, 29 Apr 2017 22:02:55 +0200 Subject: [PATCH 18/35] [FIX] Switch to tagged release --- scripts/install | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/install b/scripts/install index d58f08e..55ab135 100644 --- a/scripts/install +++ b/scripts/install @@ -83,15 +83,16 @@ ynh_psql_create_db_without_password "$app" sudo systemctl restart postgresql # Download all sources rbenv, ruby and mastodon -pushd $final_path/live sudo su - $app < Date: Sat, 29 Apr 2017 22:05:18 +0200 Subject: [PATCH 19/35] [FIX] Upgrade with tagged release --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index e3afa94..f909d05 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -43,7 +43,7 @@ sudo su - $app < Date: Sat, 29 Apr 2017 23:48:37 +0200 Subject: [PATCH 20/35] [fix] Switch branch to tagged release --- scripts/upgrade | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index f909d05..117a95f 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -37,13 +37,19 @@ sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/$app.conf # Stop Mastodon Services sudo systemctl stop mastodon-*.service -# Update Mastodon -pushd /opt/mastodon/live -sudo su - $app < Date: Sat, 29 Apr 2017 23:50:30 +0200 Subject: [PATCH 21/35] [fix] Pushd --- scripts/upgrade | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/upgrade b/scripts/upgrade index 117a95f..d1f985e 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -50,6 +50,7 @@ sudo git checkout $(git tag | tail -n 1) # Apply Mastodon upgrade sudo su - $app < Date: Sat, 29 Apr 2017 23:53:33 +0200 Subject: [PATCH 22/35] [fix] Restore with psql --- scripts/restore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/restore b/scripts/restore index 3f63380..965f6f0 100644 --- a/scripts/restore +++ b/scripts/restore @@ -104,7 +104,7 @@ RAILS_ENV=production bin/bundle exec rails assets:precompile RCOMMANDS # restore database -sudo pg_dump mastodon_production < $YNH_APP_BACKUP_DIR/mastodon_db.sql +sudo psql mastodon_production < $YNH_APP_BACKUP_DIR/mastodon_db.sql # Create symlink for ruby sudo ln -s /opt/mastodon/.rbenv/versions/2.4.1/bin/ruby /usr/bin/ruby || true From 3b3f95cfe38c83499a183518038c4db8119a3acf Mon Sep 17 00:00:00 2001 From: nemsia Date: Sat, 29 Apr 2017 23:58:25 +0200 Subject: [PATCH 23/35] [enh] Switch tagged release on install Work with 1.3.2 --- scripts/install | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/install b/scripts/install index 5d1e75e..1b82828 100644 --- a/scripts/install +++ b/scripts/install @@ -89,6 +89,10 @@ git clone https://github.com/rbenv/ruby-build.git $final_path/.rbenv/plugins/rub git clone https://github.com/tootsuite/mastodon.git $final_path/live CLONECOMMANDS +# Switch to tagged release +pushd $final_path/live +sudo git checkout $(git tag | tail -n 1) + # Be king rewind (/var/cache/yunohost/from_file/scripts) popd From 5bcc59f37c0512c9c2adf6f3946770ade60f0f96 Mon Sep 17 00:00:00 2001 From: nemsia Date: Sun, 30 Apr 2017 00:01:11 +0200 Subject: [PATCH 24/35] [enh] Switch to tagged release on upgrade --- scripts/upgrade | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 07b3ee7..d1f985e 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -37,12 +37,20 @@ sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/$app.conf # Stop Mastodon Services sudo systemctl stop mastodon-*.service -# Update Mastodon -sudo su - $app < Date: Sun, 30 Apr 2017 00:32:05 +0200 Subject: [PATCH 25/35] [fix] popd error --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index b6be33c..a633a5d 100644 --- a/scripts/install +++ b/scripts/install @@ -162,7 +162,7 @@ type rbenv BCOMMANDS # Add Services -pushd $(popd) +popd sudo cp ../conf/mastodon-web.service /etc/systemd/system/mastodon-web.service sudo chown root: /etc/systemd/system/mastodon-web.service From bf0b5ad36b12dc5516ce7429da2ded28e4904209 Mon Sep 17 00:00:00 2001 From: nemsia Date: Sun, 30 Apr 2017 00:35:01 +0200 Subject: [PATCH 26/35] [fix] popd on services file copy --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 1b82828..263a8dd 100644 --- a/scripts/install +++ b/scripts/install @@ -162,7 +162,7 @@ type rbenv BCOMMANDS # Add Services -pushd $(popd) +popd sudo cp ../conf/mastodon-web.service /etc/systemd/system/mastodon-web.service sudo chown root: /etc/systemd/system/mastodon-web.service From 003c40c9e823b164126b6b18f7f90b9be9b0b5d8 Mon Sep 17 00:00:00 2001 From: nemsia Date: Sun, 30 Apr 2017 00:53:56 +0200 Subject: [PATCH 27/35] [fix] change pushd to cd --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 263a8dd..b36c8f2 100644 --- a/scripts/install +++ b/scripts/install @@ -90,7 +90,7 @@ git clone https://github.com/tootsuite/mastodon.git $final_path/live CLONECOMMANDS # Switch to tagged release -pushd $final_path/live +cd $final_path/live sudo git checkout $(git tag | tail -n 1) # Be king rewind (/var/cache/yunohost/from_file/scripts) From e3e4ee08e5af3e5b21e8a85362e95f8871dd4a9a Mon Sep 17 00:00:00 2001 From: nemsia Date: Sun, 30 Apr 2017 14:07:59 +0200 Subject: [PATCH 28/35] [fix] Change pushd to cd on upgrade --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index d1f985e..c9adc9d 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -45,7 +45,7 @@ git pull https://github.com/tootsuite/mastodon.git master PULLCOMMANDS # Switch branch to tagged release -pushd /opt/mastodon/live +cd /opt/mastodon/live sudo git checkout $(git tag | tail -n 1) # Apply Mastodon upgrade From 3a2f559174308a6488bc875f42b28f1d18d3a008 Mon Sep 17 00:00:00 2001 From: nemsia Date: Sun, 30 Apr 2017 14:13:44 +0200 Subject: [PATCH 29/35] [enh] cd $final_path --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index c9adc9d..ab4bf58 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -45,7 +45,7 @@ git pull https://github.com/tootsuite/mastodon.git master PULLCOMMANDS # Switch branch to tagged release -cd /opt/mastodon/live +cd $final_path/live sudo git checkout $(git tag | tail -n 1) # Apply Mastodon upgrade From 2f578fd2c20ce5e92c45946c4b944f3d125f1748 Mon Sep 17 00:00:00 2001 From: nemsia Date: Sun, 30 Apr 2017 23:49:00 +0200 Subject: [PATCH 30/35] [fix] Restore db with mastodon user --- scripts/restore | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/scripts/restore b/scripts/restore index 965f6f0..63ce6ee 100644 --- a/scripts/restore +++ b/scripts/restore @@ -70,9 +70,8 @@ sudo cp -a ./sources/. "$final_path" # Set permissions sudo chown -R $app: "$final_path" -sudo chmod -R a+rx /home/yunohost.backup/tmp - +# Debug sudo ls -alh "$final_path" # Change directory for create user & database postgresql @@ -104,7 +103,16 @@ RAILS_ENV=production bin/bundle exec rails assets:precompile RCOMMANDS # restore database -sudo psql mastodon_production < $YNH_APP_BACKUP_DIR/mastodon_db.sql +sudo cp $YNH_APP_BACKUP_DIR/mastodon_db.sql $final_path + +sudo su - $app < Date: Mon, 1 May 2017 14:14:04 +0200 Subject: [PATCH 31/35] [FIX] Chmod before restore --- scripts/restore | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/restore b/scripts/restore index 63ce6ee..a47ca7c 100644 --- a/scripts/restore +++ b/scripts/restore @@ -102,9 +102,11 @@ RAILS_ENV=production bin/bundle exec rails db:migrate RAILS_ENV=production bin/bundle exec rails assets:precompile RCOMMANDS -# restore database +# copy database sudo cp $YNH_APP_BACKUP_DIR/mastodon_db.sql $final_path +sudo chmod a+r $final_path/mastodon_db.sql +# Restore database sudo su - $app < Date: Mon, 1 May 2017 15:07:21 +0200 Subject: [PATCH 32/35] [fix] restore from $final_path --- scripts/restore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/restore b/scripts/restore index a47ca7c..946a62b 100644 --- a/scripts/restore +++ b/scripts/restore @@ -110,7 +110,7 @@ sudo chmod a+r $final_path/mastodon_db.sql sudo su - $app < Date: Sat, 6 May 2017 19:50:54 +0200 Subject: [PATCH 33/35] Remove git fetch --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index ab4bf58..28c3e3c 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -40,7 +40,7 @@ sudo systemctl stop mastodon-*.service # Download Mastodon sudo su - $app < Date: Sat, 6 May 2017 19:55:02 +0200 Subject: [PATCH 34/35] Update upgrade --- scripts/upgrade | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 28c3e3c..672900f 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -40,7 +40,8 @@ sudo systemctl stop mastodon-*.service # Download Mastodon sudo su - $app < Date: Sat, 6 May 2017 20:35:26 +0200 Subject: [PATCH 35/35] [fix] Owner of live --- scripts/upgrade | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/upgrade b/scripts/upgrade index 672900f..b5d1b31 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -37,6 +37,9 @@ 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 <