mirror of
https://github.com/TrezOne/docker-mods-uptime-kuma-timeout-fix.git
synced 2026-06-29 03:33:19 -04:00
@@ -6,11 +6,11 @@ In any container docker arguments, set an environment variable `DOCKER_MODS=linu
|
||||
|
||||
If adding multiple mods, enter them in an array separated by `|`, such as `DOCKER_MODS=linuxserver/mods:universal-cron|linuxserver/mods:universal-mod2`
|
||||
|
||||
This mod will ensure you have `/config/crontabs/root` and `/config/crontabs/abc` files where you can add cron jobs to run inside the container as root or as the abc user (associated with the PUID/PGID environment variables).
|
||||
This mod will ensure you have a `/config/crontabs/abc` file where you can add cron jobs to run inside the container as the abc user (associated with the PUID/PGID environment variables).
|
||||
|
||||
No cron jobs (aside from what may be included in the base OS) are included by default.
|
||||
|
||||
You can test to confirm things are working by adding the following line to `/config/crontabs/root` or `/config/crontabs/abc`
|
||||
You can test to confirm things are working by adding the following line to `/config/crontabs/abc`
|
||||
|
||||
```cron
|
||||
*/5 * * * * /bin/echo test >> /config/tmp.txt
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
# shellcheck shell=bash
|
||||
|
||||
if [ ! -f /usr/sbin/cron ] && [ -f /usr/bin/apt ]; then
|
||||
if ! builtin command -v busybox >/dev/null; then
|
||||
echo "**** Adding busybox to package install list ****"
|
||||
echo "busybox" >>/mod-repo-packages-to-install.list
|
||||
fi
|
||||
if [[ -f /usr/bin/apt ]] && [[ ! -f /usr/sbin/cron ]]; then
|
||||
echo "**** Adding cron to package install list ****"
|
||||
echo "cron" >>/mod-repo-packages-to-install.list
|
||||
else
|
||||
echo "**** cron package already installed, skipping ****"
|
||||
fi
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
/etc/s6-overlay/s6-rc.d/init-mod-universal-cron-setup/run
|
||||
Executable → Regular
@@ -0,0 +1 @@
|
||||
/etc/s6-overlay/s6-rc.d/init-mod-universal-crontab-config/run
|
||||
@@ -0,0 +1,10 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
# shellcheck shell=bash
|
||||
|
||||
if builtin command -v busybox >/dev/null && [[ $(busybox) =~ [[:space:]](crond)([,]|$) ]]; then
|
||||
exec busybox crond -f -S -l 5
|
||||
elif [[ -f /usr/bin/apt ]] && [[ -f /usr/sbin/cron ]]; then
|
||||
exec /usr/sbin/cron -f -L 5
|
||||
else
|
||||
echo "**** cron not found ****"
|
||||
fi
|
||||
@@ -1,10 +0,0 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
# shellcheck shell=bash
|
||||
|
||||
if [ -f /usr/bin/apt ]; then
|
||||
# ubuntu
|
||||
exec /usr/sbin/cron -f -L 1
|
||||
elif [ -f /sbin/apk ]; then
|
||||
# alpine
|
||||
exec /usr/sbin/crond -f -S -l 5
|
||||
fi
|
||||
Reference in New Issue
Block a user