From 72cb34675c3b0be8332c1a70a500be1ae8c88fdd Mon Sep 17 00:00:00 2001 From: Eric Nemchik Date: Wed, 25 Jan 2023 19:42:05 -0600 Subject: [PATCH] Add abc crontab --- root/etc/crontabs/abc | 0 .../etc/s6-overlay/s6-rc.d/init-crontabs-config/run | 13 +++++++++++++ 2 files changed, 13 insertions(+) create mode 100644 root/etc/crontabs/abc diff --git a/root/etc/crontabs/abc b/root/etc/crontabs/abc new file mode 100644 index 0000000..e69de29 diff --git a/root/etc/s6-overlay/s6-rc.d/init-crontabs-config/run b/root/etc/s6-overlay/s6-rc.d/init-crontabs-config/run index 5ca0899..aec275c 100755 --- a/root/etc/s6-overlay/s6-rc.d/init-crontabs-config/run +++ b/root/etc/s6-overlay/s6-rc.d/init-crontabs-config/run @@ -13,5 +13,18 @@ if [[ ! -f /config/crontabs/root ]]; then cp /etc/crontabs/root /config/crontabs/ fi +# if abc crontabs do not exist in config +# copy abc crontab from system +if [[ ! -f /config/crontabs/abc ]] && crontab -l -u abc; then + crontab -l -u abc >/config/crontabs/abc +fi + +# if abc crontabs still do not exist in config (were not copied from system) +# copy abc crontab from included defaults +if [[ ! -f /config/crontabs/abc ]]; then + cp /etc/crontabs/abc /config/crontabs/ +fi + # import user crontabs crontab -u root /config/crontabs/root +crontab -u abc /config/crontabs/abc