From 80c10035bff66da5d98f4d1b254a99349d2acbc1 Mon Sep 17 00:00:00 2001 From: WickedYoda <68271168+wickedyoda@users.noreply.github.com> Date: Thu, 23 Jan 2025 13:59:43 -0600 Subject: [PATCH] d s --- cron-job-setup-files/cronjob-setup.sh | 6 ++++-- .../setup_cron_job_updates.sh | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) rename {ubuntu-debian-based => cron-job-setup-files}/setup_cron_job_updates.sh (90%) diff --git a/cron-job-setup-files/cronjob-setup.sh b/cron-job-setup-files/cronjob-setup.sh index eced89e..d04bfa6 100644 --- a/cron-job-setup-files/cronjob-setup.sh +++ b/cron-job-setup-files/cronjob-setup.sh @@ -10,5 +10,7 @@ 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' | sudo tee -a /etc/crontab -0 */1 * * * root mount -a #makes sure the nas is mounted \ No newline at end of file +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/ubuntu-debian-based/setup_cron_job_updates.sh b/cron-job-setup-files/setup_cron_job_updates.sh similarity index 90% rename from ubuntu-debian-based/setup_cron_job_updates.sh rename to cron-job-setup-files/setup_cron_job_updates.sh index c130017..c567315 100644 --- a/ubuntu-debian-based/setup_cron_job_updates.sh +++ b/cron-job-setup-files/setup_cron_job_updates.sh @@ -21,8 +21,8 @@ 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 -0 */1 * * * root mount -a #makes sure the nas is mounted +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 # Restart the cron service to apply the new cron job sudo systemctl start cron