#!/bin/bash crontabSetupSystemInfoUpdater() { local cronEntry="* * * * * libreportal webui generate system >/dev/null 2>&1" # Check if already in crontab if sudo -u $sudo_user_name crontab -l 2>/dev/null | grep -q "libreportal webui generate system"; then isNotice "System info updater already in crontab" else # Add to crontab (sudo -u $sudo_user_name crontab -l 2>/dev/null; echo "$cronEntry") | sudo -u $sudo_user_name crontab - isSuccessful "System info updater added to crontab (every 1 minute)." fi }