#!/bin/bash crontabSetupSystemInfoUpdater() { local cronEntry="* * * * * libreportal webui generate system >/dev/null 2>&1" # Check if already in crontab if runAsManager crontab -l 2>/dev/null | grep -q "libreportal webui generate system"; then isNotice "System info updater already in crontab" else # Add to crontab (runAsManager crontab -l 2>/dev/null; echo "$cronEntry") | runAsManager crontab - isSuccessful "System info updater added to crontab (every 1 minute)." fi } # @reboot: bring every installed app back up once the rootless daemon answers. # Exists because restart:unless-stopped loses a shutdown race under rootless # docker — see crontab_boot_app_reconcile.sh for the full account. crontabSetupBootAppReconcile() { local cronEntry="@reboot ${install_scripts_dir}crontab/system/crontab_boot_app_reconcile.sh start_script >/dev/null 2>&1" if runAsManager crontab -l 2>/dev/null | grep -q "crontab_boot_app_reconcile.sh"; then isNotice "Boot app reconcile already in crontab" else (runAsManager crontab -l 2>/dev/null; echo "$cronEntry") | runAsManager crontab - isSuccessful "Boot app reconcile added to crontab (@reboot)." fi }