From 1948b3662526375559c70b448386651f3d948043 Mon Sep 17 00:00:00 2001
From: WickedYoda <68271168+wickedyoda@users.noreply.github.com>
Date: Sat, 16 Dec 2023 19:03:50 -0600
Subject: [PATCH] Updates and changes
---
.idea/misc.xml | 5 +++-
.idea/public-setupfiles.iml | 6 +++--
.../cockpit_install.sh | 0
.../media_to_usb.sh | 0
.../nas public.sh | 0
.../public_to_usb.sh | 0
.../CronUpdates-readme.txt | 0
cron-job-setup-files/cronjob-setup.sh | 13 ++++++++++
.../setup_cron_jobs.py | 0
.../setup_cronjob.py | 0
.../Fstab entries.txt | 0
fstab-setup/setup-fstab.sh | 24 +++++++++++++++++++
.../Git_clone_local_checkout.md | 5 ----
app-setup.sh => old-app-setup.sh | 0
Reset_perms.sh => omv/Reset_perms.sh | 0
.../update-portainer.sh | 0
.../debian-server-app-setup.sh | 0
.../install-client.sh | 0
{python_scripts => updates}/updates.py | 0
updates.sh => updates/updates.sh | 0
20 files changed, 45 insertions(+), 8 deletions(-)
rename cockpit_install.sh => cockpit/cockpit_install.sh (100%)
rename media_to_usb.sh => copy-move-files/media_to_usb.sh (100%)
rename nas public.sh => copy-move-files/nas public.sh (100%)
rename public_to_usb.sh => copy-move-files/public_to_usb.sh (100%)
mode change 100755 => 100644
rename CronUpdates.txt => cron-job-setup-files/CronUpdates-readme.txt (100%)
create mode 100644 cron-job-setup-files/cronjob-setup.sh
rename {python_scripts => cron-job-setup-files}/setup_cron_jobs.py (100%)
rename {python_scripts => cron-job-setup-files}/setup_cronjob.py (100%)
rename Fstab entries.txt => fstab-setup/Fstab entries.txt (100%)
create mode 100644 fstab-setup/setup-fstab.sh
rename Git_clone_local_checkout.md => git_clone_setup/Git_clone_local_checkout.md (96%)
rename app-setup.sh => old-app-setup.sh (100%)
rename Reset_perms.sh => omv/Reset_perms.sh (100%)
rename update-portainer.sh => portainer/update-portainer.sh (100%)
rename apt-get install servers.txt => server-setups/debian-server-app-setup.sh (100%)
rename Installing telegraf Debian and ubuntu.txt => telegraf-setup-scripts/install-client.sh (100%)
rename {python_scripts => updates}/updates.py (100%)
rename updates.sh => updates/updates.sh (100%)
mode change 100755 => 100644
diff --git a/.idea/misc.xml b/.idea/misc.xml
index a971a2c..b135104 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -1,4 +1,7 @@
-
+
+
+
+
\ No newline at end of file
diff --git a/.idea/public-setupfiles.iml b/.idea/public-setupfiles.iml
index d0876a7..c4142a5 100644
--- a/.idea/public-setupfiles.iml
+++ b/.idea/public-setupfiles.iml
@@ -1,8 +1,10 @@
-
-
+
+
+
+
\ No newline at end of file
diff --git a/cockpit_install.sh b/cockpit/cockpit_install.sh
similarity index 100%
rename from cockpit_install.sh
rename to cockpit/cockpit_install.sh
diff --git a/media_to_usb.sh b/copy-move-files/media_to_usb.sh
similarity index 100%
rename from media_to_usb.sh
rename to copy-move-files/media_to_usb.sh
diff --git a/nas public.sh b/copy-move-files/nas public.sh
similarity index 100%
rename from nas public.sh
rename to copy-move-files/nas public.sh
diff --git a/public_to_usb.sh b/copy-move-files/public_to_usb.sh
old mode 100755
new mode 100644
similarity index 100%
rename from public_to_usb.sh
rename to copy-move-files/public_to_usb.sh
diff --git a/CronUpdates.txt b/cron-job-setup-files/CronUpdates-readme.txt
similarity index 100%
rename from CronUpdates.txt
rename to cron-job-setup-files/CronUpdates-readme.txt
diff --git a/cron-job-setup-files/cronjob-setup.sh b/cron-job-setup-files/cronjob-setup.sh
new file mode 100644
index 0000000..0eb54e3
--- /dev/null
+++ b/cron-job-setup-files/cronjob-setup.sh
@@ -0,0 +1,13 @@
+# Update Apt-cache
+sudo apt-get update
+
+# install needed packages
+sudo apt install cron cron-apt crontab-y
+
+# enable system services
+sudo systemctl enable cron
+sudo systemctl start cron
+
+# Echo the command below into the file /etc/crontab
+echo 'MAILTO="alert@tyates.one"
+0 */6 * * * root apt-get update && apt install upgrade -y && apt-get -y -d full-upgrade && apt-get autoremove -y' | sudo tee -a /etc/crontab
diff --git a/python_scripts/setup_cron_jobs.py b/cron-job-setup-files/setup_cron_jobs.py
similarity index 100%
rename from python_scripts/setup_cron_jobs.py
rename to cron-job-setup-files/setup_cron_jobs.py
diff --git a/python_scripts/setup_cronjob.py b/cron-job-setup-files/setup_cronjob.py
similarity index 100%
rename from python_scripts/setup_cronjob.py
rename to cron-job-setup-files/setup_cronjob.py
diff --git a/Fstab entries.txt b/fstab-setup/Fstab entries.txt
similarity index 100%
rename from Fstab entries.txt
rename to fstab-setup/Fstab entries.txt
diff --git a/fstab-setup/setup-fstab.sh b/fstab-setup/setup-fstab.sh
new file mode 100644
index 0000000..2cf953c
--- /dev/null
+++ b/fstab-setup/setup-fstab.sh
@@ -0,0 +1,24 @@
+# base
+apt update
+apt-get -y install \
+ samba-common-bin \
+ smbclient \
+ cifs-utils \
+ exfat-fuse \
+ curl \
+ unattended-upgrades \
+ cron-apt \
+ git \
+ curl
+
+# Make directories
+cd /home
+mkdir nasmedia
+mkdir naspublic
+
+# Echo the command below into the file /etc/fstab
+echo '//nas/public /home/naspublic cifs vers=2.0,username=admin,password=,file_mode=0777,dir_mode=0777 0 0
+//nas/DownloadedMedia /home/nasmedia cifs vers=2.0,username=admin,password=,file_mode=0777,dir_mode=0777 0 0' | sudo tee -a /etc/fstab
+
+
+
diff --git a/Git_clone_local_checkout.md b/git_clone_setup/Git_clone_local_checkout.md
similarity index 96%
rename from Git_clone_local_checkout.md
rename to git_clone_setup/Git_clone_local_checkout.md
index 76ce274..4fedbc7 100644
--- a/Git_clone_local_checkout.md
+++ b/git_clone_setup/Git_clone_local_checkout.md
@@ -1,10 +1,5 @@
git init
-
git remote add origin https://github.com/wickedyoda/public-setupfiles
-
git fetch
-
git checkout main
-
-
To remove "rm -rf .git"
diff --git a/app-setup.sh b/old-app-setup.sh
similarity index 100%
rename from app-setup.sh
rename to old-app-setup.sh
diff --git a/Reset_perms.sh b/omv/Reset_perms.sh
similarity index 100%
rename from Reset_perms.sh
rename to omv/Reset_perms.sh
diff --git a/update-portainer.sh b/portainer/update-portainer.sh
similarity index 100%
rename from update-portainer.sh
rename to portainer/update-portainer.sh
diff --git a/apt-get install servers.txt b/server-setups/debian-server-app-setup.sh
similarity index 100%
rename from apt-get install servers.txt
rename to server-setups/debian-server-app-setup.sh
diff --git a/Installing telegraf Debian and ubuntu.txt b/telegraf-setup-scripts/install-client.sh
similarity index 100%
rename from Installing telegraf Debian and ubuntu.txt
rename to telegraf-setup-scripts/install-client.sh
diff --git a/python_scripts/updates.py b/updates/updates.py
similarity index 100%
rename from python_scripts/updates.py
rename to updates/updates.py
diff --git a/updates.sh b/updates/updates.sh
old mode 100755
new mode 100644
similarity index 100%
rename from updates.sh
rename to updates/updates.sh