how do i sudo unattended #
We can achieve this with the power of sudoers. By adding ian ALL=(ALL:ALL) NOPASSWD:/home/ian/update.sh to /etc/sudoers.d/update I can now execute the update script in the home directory with sudo privileges without a password from the user ian.
the update script #
just a simple apt update and apt upgrade with -y for unattended execution.
#!/bin/bash
apt update
apt upgrade -ynow to schedule #
just a simple n8n automation to run the script every week.