From c6f70f5c6770995744e9eeb49e4e4a38aff9c7f0 Mon Sep 17 00:00:00 2001 From: Daniel Dolezal Date: Fri, 1 Jul 2022 19:34:27 +0200 Subject: [PATCH] add test crontab and test_script --- .gitignore | 2 -- Testing/crontab.txt | 1 + Testing/test_script.sh | 3 +++ build.sh | 4 ++-- 4 files changed, 6 insertions(+), 4 deletions(-) create mode 100644 Testing/crontab.txt create mode 100755 Testing/test_script.sh diff --git a/.gitignore b/.gitignore index 6546af6..54321b0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,3 @@ sshkeys/clients/ sshkeys/host/ -crontab.txt -maintain_repo.sh backups/ diff --git a/Testing/crontab.txt b/Testing/crontab.txt new file mode 100644 index 0000000..5b4d1ab --- /dev/null +++ b/Testing/crontab.txt @@ -0,0 +1 @@ +* * * * * /test_script.sh \ No newline at end of file diff --git a/Testing/test_script.sh b/Testing/test_script.sh new file mode 100755 index 0000000..cc37238 --- /dev/null +++ b/Testing/test_script.sh @@ -0,0 +1,3 @@ +# !/bin/bash + +echo "$(date +%Y-%m-%d_%H:%M:%S) Test" >> /logs/test.log diff --git a/build.sh b/build.sh index e118579..958efd5 100755 --- a/build.sh +++ b/build.sh @@ -12,8 +12,8 @@ run_docker_container() { -e MAINTENANCE_ENABLE="true" \ -e INTERACTIVE_MODE="true" \ -e TZ="Europe/Vienna" \ - -v "$PWD"/crontab.txt:/crontab.txt \ - -v "$PWD"/maintain_repo.sh:/maintain_repo.sh \ + -v "$PWD"/Testing/crontab.txt:/crontab.txt \ + -v "$PWD"/Testing/test_script.sh:/test_script.sh \ -v "$PWD"/sshkeys/clients:/sshkeys/clients \ -v "$PWD"/backups:/backups \ "$DOCKER_IMAGE_NAME":"$GIT_BRANCH"