Don't touch built-in crontabs in RO mode

This commit is contained in:
thespad 2024-06-14 14:02:03 +01:00
parent b68b2644fe
commit 78ab9cc511
No known key found for this signature in database
GPG key ID: 08F06191F4587860

View file

@ -2,10 +2,12 @@
# shellcheck shell=bash
for cron_user in abc root; do
if [[ -z ${LSIO_READ_ONLY_FS} ]] && [[ -z ${LSIO_NON_ROOT_USER} ]]; then
if [[ -f "/etc/crontabs/${cron_user}" ]]; then
lsiown "${cron_user}":"${cron_user}" "/etc/crontabs/${cron_user}"
crontab -u "${cron_user}" "/etc/crontabs/${cron_user}"
fi
fi
if [[ -f "/defaults/crontabs/${cron_user}" ]]; then
# make folders