Skip to content

Commit 033b399

Browse files
FEATURE (cron): Remove cron during installation (rely on unless-stopped from Docker)
1 parent 9ba0ef4 commit 033b399

File tree

1 file changed

+6
-18
lines changed

1 file changed

+6
-18
lines changed

install-postgresus.sh

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -88,26 +88,14 @@ services:
8888
EOF
8989
log "docker-compose.yml created successfully"
9090

91-
# Install cron if not installed
92-
if ! command -v cron &> /dev/null; then
93-
log "Cron not found. Installing cron..."
94-
apt-get update
95-
apt-get install -y cron
96-
systemctl enable cron
97-
log "Cron installed successfully"
98-
else
99-
log "Cron already installed"
100-
fi
101-
102-
# Add cron job for system reboot
103-
log "Setting up cron job to start PostgresUS on system reboot..."
104-
CRON_JOB="@reboot cd $INSTALL_DIR && docker compose up -d >> $INSTALL_DIR/postgresus-startup.log 2>&1"
105-
(crontab -l 2>/dev/null | grep -v "$INSTALL_DIR.*docker-compose"; echo "$CRON_JOB") | crontab -
106-
log "Cron job configured successfully"
91+
# Start PostgresUS
92+
log "Starting PostgresUS..."
93+
cd "$INSTALL_DIR"
94+
docker compose up -d
95+
log "PostgresUS started successfully"
10796

10897
log "Postgresus installation completed successfully!"
10998
log "-------------------------------------------"
110-
log "To launch immediately:"
99+
log "To launch:"
111100
log "> cd $INSTALL_DIR && docker compose up -d"
112-
log "Or reboot system to auto-start via cron"
113101
log "Access Postgresus at: http://localhost:4005"

0 commit comments

Comments
 (0)