From 376e46a9dde83042730663d340dbb5d2f9b31944 Mon Sep 17 00:00:00 2001 From: Rostislav Dugin Date: Sun, 8 Jun 2025 18:32:01 +0300 Subject: [PATCH] FIX (cron): Fix settuping cron job for restart --- docker-compose.yml.example | 2 +- install-postgresus.sh | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docker-compose.yml.example b/docker-compose.yml.example index 8a8884e..e1e6650 100644 --- a/docker-compose.yml.example +++ b/docker-compose.yml.example @@ -34,7 +34,7 @@ services: command: -p 5437 shm_size: 10gb healthcheck: - test: ["CMD-SHELL", "pg_isready -U postgresus -d postgresus -p 5437"] + test: ["CMD-SHELL", "pg_isready -U postgres -d postgresus -p 5437"] interval: 5s timeout: 5s retries: 5 diff --git a/install-postgresus.sh b/install-postgresus.sh index 296bafd..a57b1ee 100644 --- a/install-postgresus.sh +++ b/install-postgresus.sh @@ -80,7 +80,7 @@ services: command: -p 5437 shm_size: 10gb healthcheck: - test: ["CMD-SHELL", "pg_isready -U postgresus -d postgresus -p 5437"] + test: ["CMD-SHELL", "pg_isready -U postgres -d postgresus -p 5437"] interval: 5s timeout: 5s retries: 5 @@ -101,13 +101,13 @@ fi # Add cron job for system reboot log "Setting up cron job to start PostgresUS on system reboot..." -CRON_JOB="@reboot cd $INSTALL_DIR && docker-compose up -d >> $INSTALL_DIR/postgresus-startup.log 2>&1" +CRON_JOB="@reboot cd $INSTALL_DIR && docker compose up -d >> $INSTALL_DIR/postgresus-startup.log 2>&1" (crontab -l 2>/dev/null | grep -v "$INSTALL_DIR.*docker-compose"; echo "$CRON_JOB") | crontab - log "Cron job configured successfully" -log "PostgresUS installation completed successfully!" +log "Postgresus installation completed successfully!" log "-------------------------------------------" log "To launch immediately:" log "> cd $INSTALL_DIR && docker compose up -d" log "Or reboot system to auto-start via cron" -log "Access PostgresUS at: http://localhost:4005" \ No newline at end of file +log "Access Postgresus at: http://localhost:4005" \ No newline at end of file