2023-12-16 19:03:50 -06:00
|
|
|
# Update Apt-cache
|
|
|
|
|
sudo apt-get update
|
|
|
|
|
|
|
|
|
|
# install needed packages
|
2023-12-17 14:24:08 -06:00
|
|
|
sudo apt install python3 cron cron-apt crontab python3-crontab -y
|
2023-12-16 19:03:50 -06:00
|
|
|
|
|
|
|
|
# enable system services
|
|
|
|
|
sudo systemctl enable cron
|
|
|
|
|
sudo systemctl start cron
|
|
|
|
|
|
|
|
|
|
# Echo the command below into the file /etc/crontab
|
2025-01-23 13:42:49 -06:00
|
|
|
echo '"MAILTO="alerts@tyates.one"
|
2025-01-23 13:59:43 -06:00
|
|
|
0 */6 * * * root apt-get update && apt-get -y -d full-upgrade && apt-get autoremove -y && sudo apt-get clean -y && sudo apt-get purge -y'
|
|
|
|
|
0 */1 * * * root mount -a | sudo tee -a /etc/crontab
|
|
|
|
|
|
|
|
|
|
#makes sure the nas is mounted
|