Files
webgui/sbin/update_cron
Tom Mortensen f9ec00b488 repo reorg
2023-06-02 12:49:33 -07:00

20 lines
433 B
Plaintext
Executable File

#/bin/bash
# Concatenate the set of installed plugin cron files
# into a single system crontab.
cron_files() {
cat /boot/config/plugins/dynamix/*.cron 2>/dev/null
for plugin in /var/log/plugins/*.plg; do
plugin=${plugin##*/}
cat /boot/config/plugins/${plugin%.*}/*.cron 2>/dev/null
done
}
ENTRIES=$(cron_files)
if [[ "$ENTRIES" ]]; then
echo "$ENTRIES"|crontab -c /etc/cron.d -
else
crontab -c /etc/cron.d -d
fi