From 2ad8397ad619dfb3cefde4a8ae09d90751e87867 Mon Sep 17 00:00:00 2001 From: WickedYoda <68271168+wickedyoda@users.noreply.github.com> Date: Thu, 23 Jan 2025 14:02:18 -0600 Subject: [PATCH] ed d --- cron-job-setup-files/cronjob-setup.sh | 16 ---------------- cron-job-setup-files/setup_cron_job_updates.sh | 2 +- 2 files changed, 1 insertion(+), 17 deletions(-) delete mode 100644 cron-job-setup-files/cronjob-setup.sh diff --git a/cron-job-setup-files/cronjob-setup.sh b/cron-job-setup-files/cronjob-setup.sh deleted file mode 100644 index d04bfa6..0000000 --- a/cron-job-setup-files/cronjob-setup.sh +++ /dev/null @@ -1,16 +0,0 @@ -# Update Apt-cache -sudo apt-get update - -# install needed packages -sudo apt install python3 cron cron-apt crontab python3-crontab -y - -# enable system services -sudo systemctl enable cron -sudo systemctl start cron - -# Echo the command below into the file /etc/crontab -echo '"MAILTO="alerts@tyates.one" -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 \ No newline at end of file diff --git a/cron-job-setup-files/setup_cron_job_updates.sh b/cron-job-setup-files/setup_cron_job_updates.sh index c567315..defcde0 100644 --- a/cron-job-setup-files/setup_cron_job_updates.sh +++ b/cron-job-setup-files/setup_cron_job_updates.sh @@ -22,7 +22,7 @@ sudo systemctl stop cron # Added new line to test. echo '"MAILTO="alerts@tyates.one" 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' - | sudo tee -a /etc/crontab #makes sure the nas is mounted +0 */1 * * * root mount -a | sudo tee -a /etc/crontab #makes sure the nas is mounted # Restart the cron service to apply the new cron job sudo systemctl start cron