mirror of
https://github.com/ghndrx/bash.git
synced 2026-02-10 06:45:12 +00:00
mod snapshot - add bluetooth install script
This commit is contained in:
18
scripts/install-bluetooth-arch.sh
Normal file
18
scripts/install-bluetooth-arch.sh
Normal file
@@ -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
|
||||||
5
scripts/snapshot-arch.sh
Normal file → Executable file
5
scripts/snapshot-arch.sh
Normal file → Executable file
@@ -4,8 +4,8 @@
|
|||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
# Define the source and destination directories
|
# Define the source and destination directories
|
||||||
src_dir="$HOME/Desktop"
|
src_dir="/home"
|
||||||
dst_dir="$HOME/snapshots"
|
dst_dir="/opt/snapshots"
|
||||||
|
|
||||||
# Ensure the destination directory exists
|
# Ensure the destination directory exists
|
||||||
mkdir -p "$dst_dir"
|
mkdir -p "$dst_dir"
|
||||||
@@ -18,3 +18,4 @@ btrfs subvolume snapshot "$src_dir" "$dst_dir/desktop_snapshot_$(date +%Y%m%d%H%
|
|||||||
# @reboot $HOME/snapshots/snapshot.sh
|
# @reboot $HOME/snapshots/snapshot.sh
|
||||||
# Every 12 hours take a snapshot
|
# Every 12 hours take a snapshot
|
||||||
# 0 */12 * * * $HOME/snapshots/snapshot.sh
|
# 0 */12 * * * $HOME/snapshots/snapshot.sh
|
||||||
|
@reboot /home/greg/Documents/github-repos/bash/scripts/snapshot-arch.sh
|
||||||
Reference in New Issue
Block a user