Skip to content

Commit

Permalink
Move update.sh to update_tarsnap.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
steveno committed Nov 25, 2023
1 parent 541dd92 commit 773a18c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 15 deletions.
1 change: 0 additions & 1 deletion .chezmoiignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ LICENSE

# Non-dotfile setup
setup.sh
update.sh
tarsnap
14 changes: 0 additions & 14 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,6 @@ set -o nounset
set -o errexit
set -o pipefail

# tarsnap apt
cd /tmp
wget https://pkg.tarsnap.com/tarsnap-deb-packaging-key.asc
sudo apt-key add tarsnap-deb-packaging-key.asc
echo "deb http://pkg.tarsnap.com/deb/$(lsb_release -s -c) ./" | sudo tee -a /etc/apt/sources.list.d/tarsnap.list

# yubikey
sudo add-apt-repository ppa:yubico/stable

Expand All @@ -32,11 +26,3 @@ sudo apt install libgtk-3-dev libgee-0.8-dev libsqlite3-dev valac

# Install yubikey packages
sudo apt install yubikey-manager yubioath-desktop yubikey-personalization-gui

# tarsnap config
sudo cp tarsnap/tarsnap.timer /etc/systemd/system/
sudo cp tarsnap/tarsnap.service /etc/systemd/system/
sudo cp tarsnap/tarsnap-backup.sh /root/
sudo cp tarsnap/tarsnap.conf /etc/

sudo systemctl enable --now tarsnap.timer
9 changes: 9 additions & 0 deletions update.sh → tarsnap/update_tarsnap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,21 @@ set -o nounset
set -o errexit
set -o pipefail

if ! test -f "$APT_CONFIG"; then
cd /tmp
wget https://pkg.tarsnap.com/tarsnap-deb-packaging-key.asc
sudo apt-key add tarsnap-deb-packaging-key.asc
echo "deb http://pkg.tarsnap.com/deb/$(lsb_release -s -c) ./" | sudo tee -a /etc/apt/sources.list.d/tarsnap.list
fi

# Update tarsnap script and configuration
sudo cp tarsnap/tarsnap.conf /etc/
sudo cp tarsnap/tarsnap-backup.sh /root/

# Update the tarsnap timer and service
sudo cp tarsnap/tarsnap.timer /etc/systemd/system/
sudo cp tarsnap/tarsnap.service /etc/systemd/system/

sudo systemctl enable --now tarsnap.timer
sudo systemctl daemon-reload

0 comments on commit 773a18c

Please sign in to comment.