mirror of
https://github.com/YunoHost-Apps/glitchsoc_ynh.git
synced 2024-09-03 19:15:59 +02:00
Merge branch 'master' into patch-1
This commit is contained in:
commit
e245bb18e4
2 changed files with 12 additions and 3 deletions
|
@ -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 <<< \
|
||||
|
@ -81,12 +83,19 @@ sudo su -c "psql" postgres <<< \
|
|||
sudo su -c "psql" postgres <<< \
|
||||
"update pg_database set datistemplate='true' where datname='template1';"
|
||||
|
||||
# Copy postgresql dump
|
||||
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 <<COMMANDS
|
||||
pg_dump --role=mastodon -U postgres --no-password mastodon < $YNH_APP_BACKUP_DIR/mastodon_db.sql
|
||||
pg_restore --role=mastodon -U postgres --no-password < $final_path/mastodon_db.sql
|
||||
COMMANDS
|
||||
|
||||
# Delete dump after restore
|
||||
# rm $final_path/mastodon_db.sql
|
||||
|
||||
# Create symlink for ruby
|
||||
sudo ln -s /opt/mastodon/.rbenv/versions/2.4.1/bin/ruby /usr/bin/ruby || true
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ sudo systemctl stop mastodon-*.service
|
|||
|
||||
# Update Mastodon
|
||||
sudo su - $app <<COMMANDS
|
||||
pushd ~/live
|
||||
cd live
|
||||
git fetch
|
||||
git pull https://github.com/tootsuite/mastodon.git master
|
||||
git checkout $(git tag | tail -n 1)
|
||||
|
|
Loading…
Reference in a new issue