cat/EOF doesnt like to be inside if statement

This commit is contained in:
cventastic
2022-01-23 16:53:34 +01:00
parent 93ee872cb1
commit 4992cc2fff

View File

@@ -1,18 +1,19 @@
#!/bin/bash #!/bin/bash
cat<<-EOF > rclone.conf
[release]
type = s3
provider = AWS
env_auth = false
region = us-west-1
acl = public-read
server_side_encryption = AES256
storage_class = REDUCED_REDUNDANCY
EOF
if [ ! -f /setupdone ] if [ ! -f /setupdone ]
then then
# https://docs.harmony.one/home/network/validators/node-setup/syncing-db#2.-configuring-rclone # https://docs.harmony.one/home/network/validators/node-setup/syncing-db#2.-configuring-rclone
cat<<-EOF > rclone.conf
[release]
type = s3
provider = AWS
env_auth = false
region = us-west-1
acl = public-read
server_side_encryption = AES256
storage_class = REDUCED_REDUNDANCY
EOF
rclone --config=rclone.conf -P -L sync release:pub.harmony.one/mainnet.min/harmony_db_0 /harmony/harmony_db_0 --multi-thread-streams 4 --transfers=8 rclone --config=rclone.conf -P -L sync release:pub.harmony.one/mainnet.min/harmony_db_0 /harmony/harmony_db_0 --multi-thread-streams 4 --transfers=8
rclone --config+rclone.conf -P -L sync release:pub.harmony.one/mainnet.min/harmony_db_1 /harmony/harmony_db_1 --multi-thread-streams 4 --transfers=8 rclone --config+rclone.conf -P -L sync release:pub.harmony.one/mainnet.min/harmony_db_1 /harmony/harmony_db_1 --multi-thread-streams 4 --transfers=8
touch /setupdone touch /setupdone