From ebd65b62f4f314e7c1a6fe1c847fc2cec52e4f15 Mon Sep 17 00:00:00 2001 From: "Alex Pooley (@zuedev)" Date: Thu, 7 May 2026 12:45:26 +0100 Subject: add scripts and cron jobs --- docker-compose.yaml | 9 +++++++++ etc/cron.d/10m | 1 + scripts/mirrors.bash | 5 +++++ 3 files changed, 15 insertions(+) create mode 100644 etc/cron.d/10m create mode 100644 scripts/mirrors.bash diff --git a/docker-compose.yaml b/docker-compose.yaml index 204c145..daa6d62 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -29,6 +29,15 @@ services: # Copy the entrypoint script into the container COPY entrypoint.bash / + # Copy cron jobs + COPY etc/cron.d/* /etc/cron.d/ + + # Copy scripts + COPY scripts/* /scripts/ + + # Set appropriate permissions for the scripts + RUN chmod +x /scripts/* + # Make the entrypoint script executable RUN chmod +x /entrypoint.bash diff --git a/etc/cron.d/10m b/etc/cron.d/10m new file mode 100644 index 0000000..56b6070 --- /dev/null +++ b/etc/cron.d/10m @@ -0,0 +1 @@ +* * * * * /bin/bash /scripts/mirrors.bash >> /var/log/mirrors.log 2>&1 \ No newline at end of file diff --git a/scripts/mirrors.bash b/scripts/mirrors.bash new file mode 100644 index 0000000..02c333f --- /dev/null +++ b/scripts/mirrors.bash @@ -0,0 +1,5 @@ +#/bin/bash + +# This script is responsible for pushing to mirrors of the git repositories. It runs through all the repositories in the /repositories directory and performs a git push to the corresponding mirror URL(s) defined in the .gitinfo file if they exist. + +echo "to be implemented" \ No newline at end of file -- cgit v1.2.3