aboutsummaryrefslogtreecommitdiff
path: root/Docker/entrypoint.sh
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2018-04-26 12:00:14 +0200
committerGravatar GitHub <noreply@github.com> 2018-04-26 12:00:14 +0200
commit4381117a197efca11ce896791ef35c6e52c7130f (patch)
tree5b7a893d83fd2899d27fc55d33f823dd2709ffc9 /Docker/entrypoint.sh
parentd454e90d29b8a15168e07fefcb72554e5204193c (diff)
cron in Docker image (#1871)
* cron in Docker image https://github.com/FreshRSS/FreshRSS/issues/1869 * Fix cron CMD * Minor readme * Docker run d instead of dit There should not be a need for STDIN or TTY * Minor sed param
Diffstat (limited to 'Docker/entrypoint.sh')
-rwxr-xr-xDocker/entrypoint.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/Docker/entrypoint.sh b/Docker/entrypoint.sh
new file mode 100755
index 000000000..5b643da93
--- /dev/null
+++ b/Docker/entrypoint.sh
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+php -f ./cli/prepare.php > /dev/null
+
+chown -R :www-data .
+chmod -R g+r . && chmod -R g+w ./data/
+
+if [ -n "$CRON_MIN" ]; then
+ sed -r -i "/FreshRSS/s/^[^ ]+ /$CRON_MIN /" /var/spool/cron/crontabs/root
+fi
+
+exec "$@"