Skip to content

Commit

Permalink
Fix acme
Browse files Browse the repository at this point in the history
  • Loading branch information
dhelonious committed Sep 20, 2024
1 parent 409f149 commit 900591c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
6 changes: 3 additions & 3 deletions snap/hooks/install
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ echo Install postgres

export PG_PASSWORD=$(generate_secret postgres)

mkdir_for_daemon_user "$SNAP_DATA/postgres"
mkdir_for_daemon_user "$PG_HOME"

copy_config_as_daemon_user postgres postgresql.conf
setup_postgres_database
Expand All @@ -38,7 +38,7 @@ update_postgres_version_file
echo Install redis
. "$SNAP/redis.env"

mkdir_for_daemon_user "$SNAP_DATA/redis"
mkdir_for_daemon_user "$REDIS_HOME"

# export REDIS_PASSWORD=$(generate_secret redis)

Expand All @@ -49,7 +49,7 @@ copy_config_as_daemon_user redis redis.conf
echo Install mastodon
. "$SNAP/mastodon.env"

mkdir_for_daemon_user "$SNAP_DATA/mastodon"
mkdir_for_daemon_user "$MASTODON_HOME"

reset_recompile_required

Expand Down
8 changes: 5 additions & 3 deletions snap/hooks/post-refresh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ fix_daemon_user "$LOG_DIR"

# NOTE: This is a fix for older versions and may be removed in the future
echo Set permissions on postgres files and dirs
fix_daemon_user "$SNAP_DATA/postgres"
fix_daemon_user "$PG_HOME"
fix_daemon_user "$PG_SOCK_DIR"
fix_daemon_user "$PG_LOG_FILE"
if [ -d "$PG_DATA" ]; then
Expand Down Expand Up @@ -45,9 +45,11 @@ fi

# Redis

. "$SNAP/redis.env"

# NOTE: This is a fix for older versions and may be removed in the future
echo Set permissions on redis files and dirs
fix_daemon_user "$SNAP_DATA/redis"
fix_daemon_user "$REDIS_HOME"
fix_daemon_user "$SOCK_DIR/redis.sock"
fix_daemon_user "$LOG_DIR/redis.log"

Expand All @@ -61,7 +63,7 @@ reset_migrations_required

# NOTE: This is a fix for older versions and may be removed in the future
echo Set permissions on mastodon files and dirs
fix_daemon_user "$SNAP_DATA/mastodon"
fix_daemon_user "$MASTODON_HOME"
fix_daemon_user "$LOG_DIR/backend.log"
fix_daemon_user "$LOG_DIR/streaming.log"
fix_daemon_user "$LOG_DIR/sidekiq.log"
Expand Down

0 comments on commit 900591c

Please sign in to comment.