From bf0182243f5e1e4b1aaaf164d7411c70ce4494cb Mon Sep 17 00:00:00 2001 From: greg Date: Tue, 23 Jan 2024 10:32:28 -0800 Subject: [PATCH] mod snapshot - add bluetooth install script --- scripts/install-bluetooth-arch.sh | 18 ++++++++++++++++++ scripts/snapshot-arch.sh | 7 ++++--- 2 files changed, 22 insertions(+), 3 deletions(-) create mode 100644 scripts/install-bluetooth-arch.sh mode change 100644 => 100755 scripts/snapshot-arch.sh diff --git a/scripts/install-bluetooth-arch.sh b/scripts/install-bluetooth-arch.sh new file mode 100644 index 0000000..abaaed1 --- /dev/null +++ b/scripts/install-bluetooth-arch.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +# Check if bluez and bluez-utils are installed +if ! command -v bluez &> /dev/null || ! command -v bluez-utils &> /dev/null; then + echo "Installing bluez and bluez-utils..." + yay -Syu bluez bluez-utils +fi + +# Check if gnome-bluetooth-3.0 is installed +if ! command -v gnome-bluetooth-3.0 &> /dev/null; then + echo "Installing gnome-bluetooth-3.0..." + yay -Syu gnome-bluetooth-3.0 +fi + +# Enable and start bluetooth service +echo "Enabling and starting bluetooth service..." +systemctl enable bluetooth.service +systemctl start bluetooth.service diff --git a/scripts/snapshot-arch.sh b/scripts/snapshot-arch.sh old mode 100644 new mode 100755 index b5f210b..586c264 --- a/scripts/snapshot-arch.sh +++ b/scripts/snapshot-arch.sh @@ -4,8 +4,8 @@ set -eu # Define the source and destination directories -src_dir="$HOME/Desktop" -dst_dir="$HOME/snapshots" +src_dir="/home" +dst_dir="/opt/snapshots" # Ensure the destination directory exists mkdir -p "$dst_dir" @@ -17,4 +17,5 @@ btrfs subvolume snapshot "$src_dir" "$dst_dir/desktop_snapshot_$(date +%Y%m%d%H% # System Reboot takes a snapshot # @reboot $HOME/snapshots/snapshot.sh # Every 12 hours take a snapshot -# 0 */12 * * * $HOME/snapshots/snapshot.sh \ No newline at end of file +# 0 */12 * * * $HOME/snapshots/snapshot.sh +@reboot /home/greg/Documents/github-repos/bash/scripts/snapshot-arch.sh \ No newline at end of file