smarter user recognition

This commit is contained in:
2026-09-02 20:54:07 -04:00
parent c999ca0655
commit f3afc87074
+13 -4
View File
@@ -6,10 +6,13 @@
# Func: terraform a fresh OS install
#
# TODO: add default dry-run
# chown everything back to user
# fix paru install?
# keep track of what failed and deliver progress report at end
# of script
# announce package before installation
# pattern matching/S&R with symlinks?
# look into exactly what archinstall doesn't give you
# check $SHELL ( this works )
# check $TERM
# git clones
# gitea setup/migrate/import?
@@ -106,7 +109,7 @@
# TODO i'm certain there's a better way to do this
CWD=$( pwd )
cd ~
cd ..
HOME=$( pwd )
USERS_BAD=$( users )
@@ -156,6 +159,7 @@ esac
echo "CWD = $CWD"
echo "HOME = $HOME"
echo "USER = ${USERS[0]}"
echo ""
echo "OS = $OS"
echo "INS = $INS"
@@ -460,7 +464,7 @@ if [[ $OS = "arch" ]]; then
cd $HOME/Documents/paru/src
git clone https://aur.archlinux.org/paru.git
cd paru
makepkg -si
#makepkg -si # can't do as root
cd $HOME
# download acli ( x86 )
@@ -590,13 +594,18 @@ if [[ $MODE -eq 2 ]]; then
echo "installing caddy ( based )"
$INS $NOCONF $FLAG caddy
read
mkdir -p $HOME/.config/dynu
cd $CWD
# copy dynu service and timer
ln -s $CWD/.config/dynu/dynu.timer /etc/systemd/system/
ln -s $CWD/.config/dynu/dynu.service /etc/systemd/system/
# copy dynu update script
ln -s $CWD/.config/dynu/dynu.sh ~/.config/dynu/
ln -s $CWD/.config/dynu/dynu.sh $HOME/.config/dynu/
ln -s $CWD/server/Caddyfile $HOME/
fi