mirror of
https://github.com/linuxserver/docker-transmission.git
synced 2025-11-02 01:35:47 +01:00
2
root/defaults/crontabs/abc
Normal file
2
root/defaults/crontabs/abc
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
# min hour day month weekday command
|
||||||
|
0 3 * * * /app/blocklist-update.sh 2>&1
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
# do daily/weekly/monthly maintenance
|
|
||||||
# min hour day month weekday command
|
|
||||||
*/15 * * * * run-parts /etc/periodic/15min
|
|
||||||
0 * * * * run-parts /etc/periodic/hourly
|
|
||||||
0 2 * * * run-parts /etc/periodic/daily
|
|
||||||
0 3 * * 6 run-parts /etc/periodic/weekly
|
|
||||||
0 5 1 * * run-parts /etc/periodic/monthly
|
|
||||||
|
|
||||||
# run daily blocklist update
|
|
||||||
0 3 * * * /app/blocklist-update.sh 2>&1
|
|
||||||
14
root/etc/s6-overlay/s6-rc.d/init-crontabs-config/run → root/etc/s6-overlay/s6-rc.d/init-crontab-config/run
Executable file → Normal file
14
root/etc/s6-overlay/s6-rc.d/init-crontabs-config/run → root/etc/s6-overlay/s6-rc.d/init-crontab-config/run
Executable file → Normal file
@@ -5,18 +5,18 @@
|
|||||||
mkdir -p \
|
mkdir -p \
|
||||||
/config/crontabs
|
/config/crontabs
|
||||||
|
|
||||||
## root
|
## abc
|
||||||
# if crontabs do not exist in config
|
# if crontabs do not exist in config
|
||||||
if [[ ! -f /config/crontabs/root ]]; then
|
if [[ ! -f /config/crontabs/abc ]]; then
|
||||||
# copy crontab from system
|
# copy crontab from system
|
||||||
if crontab -l -u root; then
|
if crontab -l -u abc; then
|
||||||
crontab -l -u root >/config/crontabs/root
|
crontab -l -u abc >/config/crontabs/abc
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# if crontabs still do not exist in config (were not copied from system)
|
# if crontabs still do not exist in config (were not copied from system)
|
||||||
# copy crontab from included defaults (using -n, do not overwrite an existing file)
|
# copy crontab from included defaults (using -n, do not overwrite an existing file)
|
||||||
cp -n /etc/crontabs/root /config/crontabs/
|
cp -n /defaults/crontabs/abc /config/crontabs/
|
||||||
fi
|
fi
|
||||||
# set permissions and import user crontabs
|
# set permissions and import user crontabs
|
||||||
lsiown root:root /config/crontabs/root
|
lsiown abc:abc /config/crontabs/abc
|
||||||
crontab -u root /config/crontabs/root
|
crontab -u abc /config/crontabs/abc
|
||||||
1
root/etc/s6-overlay/s6-rc.d/init-crontab-config/up
Normal file
1
root/etc/s6-overlay/s6-rc.d/init-crontab-config/up
Normal file
@@ -0,0 +1 @@
|
|||||||
|
/etc/s6-overlay/s6-rc.d/init-crontab-config/run
|
||||||
@@ -1 +0,0 @@
|
|||||||
/etc/s6-overlay/s6-rc.d/init-crontabs-config/run
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/with-contenv bash
|
#!/usr/bin/with-contenv bash
|
||||||
# shellcheck shell=bash
|
# shellcheck shell=bash
|
||||||
|
|
||||||
exec /usr/sbin/crond -f -S -l 5
|
exec busybox crond -f -S -l 5
|
||||||
|
|||||||
Reference in New Issue
Block a user