First version of gentoo based cron image
This commit is contained in:
4
Dockerfile
Normal file
4
Dockerfile
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
FROM cron
|
||||||
|
MAINTAINER gyurix
|
||||||
|
COPY . /
|
||||||
|
ENTRYPOINT ["/entrypoint.sh"]
|
11
cron-re-read.sh
Executable file
11
cron-re-read.sh
Executable 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
3
crontab.txt
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
* * * * * echo "OK"
|
||||||
|
* * * * * echo "OK2"
|
||||||
|
* * * * * echo "OK3"
|
11
entrypoint.sh
Executable file
11
entrypoint.sh
Executable 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
|
Reference in New Issue
Block a user