init
This commit is contained in:
commit
c4bf838784
9
Dockerfile
Normal file
9
Dockerfile
Normal file
@ -0,0 +1,9 @@
|
||||
FROM alpine
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
RUN apk add wget
|
||||
|
||||
COPY ./main.sh .
|
||||
|
||||
ENTRYPOINT [./main.sh]
|
20
main.sh
Executable file
20
main.sh
Executable file
@ -0,0 +1,20 @@
|
||||
#!/bin/sh
|
||||
|
||||
# todo parameters for website url or config file, copy dir, enabled git
|
||||
|
||||
dest_dir="/data"
|
||||
sourcefile="urls"
|
||||
git_enabled=true
|
||||
|
||||
wait_between=3600
|
||||
|
||||
|
||||
# This script watch for website in conf file and copy them statically in git repositories
|
||||
mkdir -p logs
|
||||
mkdir -p clones
|
||||
cd clones
|
||||
|
||||
while read -r line ; do
|
||||
if [ -z "$line" ] ; then continue ; fi
|
||||
wget -c -w 10 --random-wait -x -r "$line" > "../logs/$line/out.log" 2> "../logs/$line/err.log" &
|
||||
done < "../$sourcefile"
|
Loading…
Reference in New Issue
Block a user