Adding FIles

This commit is contained in:
2024-10-02 12:49:33 -04:00
parent 3b31652f0b
commit 3334f89b94
3 changed files with 58 additions and 0 deletions

35
backup.sh Executable file
View File

@@ -0,0 +1,35 @@
#!/bin/sh
####################################
#
# Backup to NFS mount script.
#
####################################
# What to backup.
backup_files="/home /etc /opt"
# old --- /boot /root /opt
# Where to backup to.
dest="/SysBackup"
# Create archive filename.
day=$(date +%A-%m-%d-%Y)
hostname=$(hostname -s)
archive_file="$hostname-$day.tgz"
# Print start status message.
echo "Backing up $backup_files to $dest/$archive_file"
date
echo
# Backup the files using tar.
tar czf $dest/$archive_file $backup_files
# Print end status message.
echo
echo "Backup finished"
date
# Long listing of files in $dest to check file sizes.
ls -lh $dest

10
gitupdate.sh Executable file
View File

@@ -0,0 +1,10 @@
#!/bin/bash
git add .
git status
echo -n "Enter the Description for the Change: " [Minor Update]
read CHANGE_MSG
git commit -m "${CHANGE_MSG}"
git push origin main
exit

13
updatesystem.sh Executable file
View File

@@ -0,0 +1,13 @@
#!/bin/bash
# if not root, run as root
if (( $EUID != 0 )); then
sudo $HOME/scripts/updatesystem.sh
exit
fi
apt update
apt list --upgradeable
read -p "Press any key to continue... " -n1 -s
apt upgrade -y
#apt-get -y dist-upgrade
apt clean
apt autoremove -y