Skip to content

Commit 0634207

Browse files
Merge pull request #3 from stakater-docker/update-run
Update run
2 parents f5c505c + 4f406e5 commit 0634207

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

run.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,20 +73,21 @@ ln -s /listbackups.sh /usr/bin/listbackups
7373

7474
touch /mongo_backup.log
7575

76-
if [[ "$INIT_BACKUP" == "true" ]]; then
76+
if [[ "${INIT_BACKUP}" == "true" ]]; then
7777
echo "=> Create a backup on the startup"
7878
/backup.sh
7979
fi
8080

81-
if [[ "$INIT_RESTORE" == "true" ]]; then
81+
if [[ "${INIT_RESTORE}" == "true" ]]; then
8282
echo "=> Restore store from lastest backup on startup"
8383
/restore.sh
8484
fi
8585

86-
if [[ "$DISABLE_CRON" == "true" ]]; then
86+
if [[ "${DISABLE_CRON}" == "true" ]]; then
8787
echo "${CRON_TIME} . /root/project_env.sh; /backup.sh >> /mongo_backup.log 2>&1" > /crontab.conf
8888
crontab /crontab.conf
8989
echo "=> Running cron job"
90-
cron && tail -f /mongo_backup.log
90+
cron
9191
fi
9292

93+
tail -f /mongo_backup.log

0 commit comments

Comments
 (0)