First commit
This commit is contained in:
23
Bit-Frigger-Tarballer
Executable file
23
Bit-Frigger-Tarballer
Executable file
@@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
# Script to export the Bit Frigger's rootfs to a zstd tarball periodically
|
||||
FINAL_DIR="/Red-Vol/Backups/Bit-Frigger/Tarball"
|
||||
#Check for root permissions
|
||||
if [[ $(whoami) != "root" ]]; then
|
||||
echo "Please run this script as root or with sudo."
|
||||
exit
|
||||
fi
|
||||
#Create directory if it does not exist
|
||||
if [[ ! -d $FINAL_DIR ]]; then
|
||||
mkdir $FINAL_DIR
|
||||
fi
|
||||
#Sync everything to it
|
||||
echo "Gathering files for the tarball"
|
||||
rsync -aHAXSv --progress --exclude=/dev --exclude=/Red-Vol --exclude=/proc --exclude=/rksmb "/" "$FINAL_DIR"
|
||||
#And tar it with ZSTD
|
||||
echo "Compressing tarball"
|
||||
cd $FINAL_DIR
|
||||
if [[ -f "$FINAL_DIR/Bit-Frigger.tar" ]]; then
|
||||
tar rvfJ Bit-Frigger.tar.xz $FINAL_DIR
|
||||
else
|
||||
tar cvfJ Bit-Frigger.tar.xz $FINAL_DIR
|
||||
fi
|
||||
18
Vol-Sync
Executable file
18
Vol-Sync
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
#Script to sync the Red-Vol when it comes up with the Tui64 share.
|
||||
INIT_DIR='/Red-Vol'
|
||||
FINAL_DIR='/rksmb/*'
|
||||
HOST_IP='192.168.1.66'
|
||||
|
||||
#Ping check
|
||||
ping -c 4 $HOST_IP > /dev/null
|
||||
#If there is ping, sync the Media and Backups subvolumes.
|
||||
if [[ $(echo $?) == 0 ]]; then
|
||||
sshpass -f /shmick/.ssh/sshpasskey rsync -aHAXv --progress --exclude="Torrents" shmick@$HOST_IP:$FINAL_DIR $INIT_DIR
|
||||
#No DNS resolution
|
||||
elif [[ $(echo $?) == 2 ]]; then
|
||||
echo "Could not resolve host."
|
||||
#No ping
|
||||
elif [[ $(echo $?) == 1 ]]; then
|
||||
echo "No communications with host."
|
||||
fi
|
||||
4
WindowsBoot
Executable file
4
WindowsBoot
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
WindowsEntry=$(efibootmgr | grep "Windows Boot Manager" | awk '{print $1}' | sed -e 's/Boot//g')
|
||||
efibootmgr -n $WindowsEntry
|
||||
reboot
|
||||
Reference in New Issue
Block a user