Skip to content

Commit

Permalink
chore(setup): minor fix s3cmd
Browse files Browse the repository at this point in the history
  • Loading branch information
hugotiburtino committed Jan 31, 2025
1 parent a0a60d2 commit 011a53d
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions scripts/setup_uberspace.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ echo 'Configure IONOS S3 Client to manage buckets'
s3cmd --configure

echo 'Downloading the .env file'
if ! s3cmd cp s3://edtr-env/${USER}/.env .; then
if ! s3cmd get s3://edtr-env/${USER}/.env .; then
echo 'Error: File not found or download failed!'
echo 'Set the .env file in the bucket first'
exit 1
Expand Down Expand Up @@ -74,13 +74,14 @@ if ! $(uberspace web backend list | grep -q 'http:3000 => OK, listening'); then
fi
echo 'Backend app opened to the internet'

# TODO: still needed?
# Only on 'production' environment
if [ "$USER" = "edtr" ]; then
# IMPORTANT: This completely overwrites existing cronjob entries!
crontab ~/serlo-editor-as-lti-tool/uberspace/backup_cron
echo 'Added cronjob for database backups'
# if [ "$USER" = "edtr" ]; then
# # IMPORTANT: This completely overwrites existing cronjob entries!
# crontab ~/serlo-editor-as-lti-tool/uberspace/backup_cron
# echo 'Added cronjob for database backups'

echo 'Available buckets:'
s3cmd ls
echo 'Create bucket serlo-test-database-backup manually if it does not appear here.'
fi
# echo 'Available buckets:'
# s3cmd ls
# echo 'Create bucket serlo-test-database-backup manually if it does not appear here.'
# fi

0 comments on commit 011a53d

Please sign in to comment.