added background check of known login managers if they are active if user chose to install sddm

This commit is contained in:
JaKooLit 2024-09-10 12:50:23 +09:00
parent 62cde7c8f6
commit 0be860cbab
2 changed files with 20 additions and 0 deletions

View File

@ -1,5 +1,8 @@
## Changelogs
## 10 Sep 2024
- added background check of known login managers if they are active if user chose to install sddm
## 08 Sep 2024
- Added final error checks on install-logs

View File

@ -172,6 +172,23 @@ printf "\n"
# Ensuring all in the scripts folder are made executable
chmod +x install-scripts/*
# check if any known login managers are active when users choose to install sddm
if [ "$sddm" == "Y" ]; then
# List of services to check
services=("gdm.service" "gdm3.service" "lightdm.service" "xdm.service" "lxdm.service")
# Loop through each service
for svc in "${services[@]}"; do
if systemctl is-active --quiet "$svc"; then
echo "${ERROR} $svc is active. Please stop or disable it first or do not choose SDDM to install."
echo "${NOTE} If you have GDM, no need to install SDDM. GDM will work fine as Login Manager for Hyprland."
exit 1
fi
done
fi
sleep 1
sudo apt update
# execute pre clean up