Skip to content

Commit 609f25f

Browse files
committed
add +w mode to files
1 parent e561275 commit 609f25f

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,8 @@ RUN chmod +x /start.sh
1515
ADD sync.sh /sync.sh
1616
RUN chmod +x /sync.sh
1717

18+
ADD get.sh /get.sh
19+
RUN chmod +x /get.sh
20+
1821
ENTRYPOINT ["/start.sh"]
1922
CMD [""]

get.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
echo "Job get started: $(date)"
6+
7+
umask 0
8+
/usr/local/bin/s3cmd get -r $PARAMS "$S3_PATH" "$DATA_PATH"
9+
chown -R +w . *
10+
11+
echo "Job get finished: $(date)"

start.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ echo "secret_key=$SECRET_KEY" >> /root/.s3cfg
1414
if [[ "$1" == 'no-cron' ]]; then
1515
exec /sync.sh
1616
elif [[ "$1" == 'get' ]]; then
17-
exec /usr/local/bin/s3cmd get -r $PARAMS "$S3_PATH" "$DATA_PATH"
17+
exec /get.sh
1818
elif [[ "$1" == 'delete' ]]; then
1919
exec /usr/local/bin/s3cmd del -r "$S3_PATH"
2020
else

0 commit comments

Comments
 (0)