1 | #!/bin/bash
|
2 | export SET_INITIAL_DATE="$1" # In format "YYYY-MM-DD"
|
3 | export DAYS_TO_SIMULATE=$2 # Can be 30
|
4 | for (( i = 0; i <= $DAYS_TO_SIMULATE; i++ ))
|
5 | do
|
6 | sudo date --set "$SET_INITIAL_DATE"
|
7 | setDateTo=$(date +%Y-%m-%d --date="+$i day")
|
8 | sudo date --set "${setDateTo}"
|
9 | sleep 1s
|
10 | for y in {1..100}
|
11 | do
|
12 | curl localhost:4444 # Assuming port is 4444
|
13 | done
|
14 | done |
\ | No newline at end of file |