From d1a76db1cfadad63d120ff1bcbc4c6e29faaaff0 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Mon, 19 Jan 2026 10:27:00 -0600 Subject: fix(archsetup): fix ZFS scrub timer and emacs clone - ZFS scrub timer: use template unit with pool name (zfs-scrub-weekly@pool.timer) - Emacs config: handle existing .emacs.d dir with git pull instead of failing --- archsetup | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'archsetup') diff --git a/archsetup b/archsetup index df0e6b7..34e8ed5 100755 --- a/archsetup +++ b/archsetup @@ -1062,7 +1062,9 @@ EOF systemctl enable sanoid.timer >> "$logfile" 2>&1 || error "error" "$action" "$?" action="enabling weekly ZFS scrub" && display "task" "$action" - systemctl enable zfs-scrub-weekly.timer >> "$logfile" 2>&1 || error "error" "$action" "$?" + # Get pool name dynamically (usually zroot) + zfs_pool=$(zpool list -H -o name | head -1) + systemctl enable "zfs-scrub-weekly@${zfs_pool}.timer" >> "$logfile" 2>&1 || error "error" "$action" "$?" # Note: zfs-replicate.timer is NOT enabled automatically # User must set up SSH key auth to TrueNAS first, then run: @@ -1410,8 +1412,14 @@ developer_workstation () { pacman_install yt-dlp # video download action="setting up emacs configuration files" && display "task" "$action" - (sudo -u "$username" git clone --recurse-submodules "$dotemacs_repo" "/home/$username/.emacs.d" >> \ - "$logfile" 2>&1) || error "error" "$action" "$?" + emacs_dir="/home/$username/.emacs.d" + if [ -d "$emacs_dir" ]; then + (cd "$emacs_dir" && sudo -u "$username" git pull --recurse-submodules >> "$logfile" 2>&1) || \ + error "error" "$action" "$?" + else + (sudo -u "$username" git clone --recurse-submodules "$dotemacs_repo" "$emacs_dir" >> \ + "$logfile" 2>&1) || error "error" "$action" "$?" + fi action="Android Utilities" && display "subtitle" "$action" pacman_install android-file-transfer -- cgit v1.2.3