commit cc058359119a6d66513df22f5d5fac9fe9ee31c2
parent 0b4e097cc440a35fb1f629568721b1f382f26d65
Author: Markus Hanetzok <markus@hanetzok.net>
Date: Thu, 30 Mar 2023 05:04:28 +0200
Extend logging for debugging purposes
Diffstat:
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/zerog b/zerog
@@ -6,7 +6,7 @@ name="$(logname)"
homedir="/home/$name"
progs="https://hanetzok.net/zerog/progs.list"
dotfiles="git://git.hanetzok.net/dotfiles"
-logfile="/tmp/zerog.log"
+logfile="/var/log/zerog.log"
suckless="git://git.hanetzok.net"
### FUNCTIONS ###
@@ -20,9 +20,10 @@ error() { # Write to logfile and exit script
prepare() {
printf "Preparing...\n"
printf "Refreshing keys...\n(This will take a while!)\n"
+ printf "#############\n### zerog ###\n#############" > "$logfile"
# Refresh keyring and update keyrings
- pacman-key --refresh >/dev/null 2>>"$logfile" || { error "Could not refresh keys"; }
+ pacman-key --refresh >/dev/null 2>>"$logfile" || { error "Could not refresh keys. Please make sure you have root privileges"; }
pacman -Sy --noconfirm archlinux-keyring parabola-keyring >/dev/null 2>>"$logfile" || { error "Could not install keyrings"; }
# Install some essential programs