aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/remove2
-rw-r--r--scripts/restore5
2 files changed, 5 insertions, 2 deletions
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
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 <<COMMANDS
@@ -121,4 +124,4 @@ sudo yunohost service add mastodon-sidekiq
sudo yunohost service add mastodon-streaming
# Reload services
-sudo systemctl reload nginx \ No newline at end of file
+sudo systemctl reload nginx