First version of gentoo based cron image

This commit is contained in:
2022-11-21 08:10:27 +00:00
parent 541be3e4ba
commit 2bbef8adc9
4 changed files with 29 additions and 0 deletions

4
Dockerfile Normal file
View File

@@ -0,0 +1,4 @@
FROM cron
MAINTAINER gyurix
COPY . /
ENTRYPOINT ["/entrypoint.sh"]

11
cron-re-read.sh Executable file
View File

@@ -0,0 +1,11 @@
#! /bin/sh
file="/crontab";
{
echo "SHELL=/bin/sh
* * * * * /cron-re-read.sh"
} > "$file";
cat /crontab.txt >> /crontab
crontab -l | cat /crontab |crontab -

3
crontab.txt Normal file
View File

@@ -0,0 +1,3 @@
* * * * * echo "OK"
* * * * * echo "OK2"
* * * * * echo "OK3"

11
entrypoint.sh Executable file
View File

@@ -0,0 +1,11 @@
#! /bin/sh
file="/crontab";
{
echo "SHELL=/bin/sh
* * * * * /cron-re-read.sh"
} >> "$file";
crontab -l | cat /crontab |crontab -
crond -f