aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Harrington <kb0iic@berzerkula.org>2021-03-24 11:20:20 -0500
committerWilliam Harrington <kb0iic@berzerkula.org>2021-03-24 11:20:20 -0500
commit64dc5f16ece5051bf4c2aa74cfeeff8172d71ed0 (patch)
tree86b10d5171b7c3bffabd406cf769c3cc45ee12c7
parentfa43dec5de9704ebf4b33aa079e636a5b4463a87 (diff)
Use HOME variable when changing ownership of backup archive.
-rw-r--r--chapter6/backup.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/chapter6/backup.sh b/chapter6/backup.sh
index 842ed27..c763d8c 100644
--- a/chapter6/backup.sh
+++ b/chapter6/backup.sh
@@ -16,7 +16,7 @@ else
printf "%b" "${RED}Backup FAILED!${RST}\n"
exit 1
else
- sudo chown "${USER}" /home/"${USER}"/"${FILE}"
+ sudo chown "${USER}" "${HOME}"/"${FILE}"
printf "%b" "${GRN}OK${RST}\n"
fi
popd > /dev/null || exit 1