enable setup home
This commit is contained in:
parent
6e11ed3ecd
commit
a1ed84ad18
1 changed files with 4 additions and 4 deletions
|
@ -31,7 +31,8 @@ read_software(){
|
||||||
setup_greetd(){
|
setup_greetd(){
|
||||||
printf "Setting up greetd\n"
|
printf "Setting up greetd\n"
|
||||||
|
|
||||||
[ -d "/etc/greetd" ] && printf "greetd directory exists" || mkdir "/etc/greetd"
|
# Check if greetd directory exists, if not, create it.
|
||||||
|
[ -d "/etc/greetd" ] || mkdir "/etc/greetd"
|
||||||
|
|
||||||
cat <<EOF > /etc/greetd/config.toml
|
cat <<EOF > /etc/greetd/config.toml
|
||||||
[terminal]
|
[terminal]
|
||||||
|
@ -47,7 +48,7 @@ EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
setup_shell(){
|
setup_shell(){
|
||||||
usermod -s /bin/zsh "$user"
|
sed -i "/^$user:/s#:[^:]*\$#:/bin/zsh#" /etc/passwd
|
||||||
echo "changed "$user"'s shell to zsh"
|
echo "changed "$user"'s shell to zsh"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -82,8 +83,6 @@ setup_chroot(){
|
||||||
check_root(){
|
check_root(){
|
||||||
if [ "$(id -u)" -ne 0 ]; then
|
if [ "$(id -u)" -ne 0 ]; then
|
||||||
echo "ERROR: you must run this script as root."; exit 1
|
echo "ERROR: you must run this script as root."; exit 1
|
||||||
else
|
|
||||||
echo "ROOT: OK"
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -97,6 +96,7 @@ echo "Welcome to the installer"
|
||||||
apk_install git
|
apk_install git
|
||||||
get_user
|
get_user
|
||||||
read_software
|
read_software
|
||||||
|
setup_home
|
||||||
deploy_dotfiles
|
deploy_dotfiles
|
||||||
setup_greetd
|
setup_greetd
|
||||||
setup_shell
|
setup_shell
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue