Revert "fix(systemd): Run disables before enables"

This reverts commit be8f58a035.
This commit is contained in:
zelikos 2023-09-17 14:39:34 -04:00
parent 2447c781f3
commit 5aca8898bf
No known key found for this signature in database
GPG key ID: AA0CB476ECFA09E7

View file

@ -9,22 +9,16 @@ get_yaml_array USER_ENABLED '.user.enabled[]' "$1"
get_yaml_array USER_DISABLED '.user.disabled[]' "$1"
if [[ ${#DISABLED[@]} -gt 0 ]]; then
for unit in "${DISABLED[@]}"; do
unit=$(printf "$unit")
systemctl disable $unit
done
fi
if [[ ${#ENABLED[@]} -gt 0 ]]; then
for unit in "${ENABLED[@]}"; do
unit=$(printf "$unit")
systemctl enable $unit
done
fi
if [[ ${#USER_DISABLED[@]} -gt 0 ]]; then
for unit in "${USER_DISABLED[@]}"; do
if [[ ${#DISABLED[@]} -gt 0 ]]; then
for unit in "${DISABLED[@]}"; do
unit=$(printf "$unit")
systemctl --global disable $unit
systemctl disable $unit
done
fi
if [[ ${#USER_ENABLED[@]} -gt 0 ]]; then
@ -33,3 +27,9 @@ if [[ ${#USER_ENABLED[@]} -gt 0 ]]; then
systemctl --global enable $unit
done
fi
if [[ ${#USER_DISABLED[@]} -gt 0 ]]; then
for unit in "${USER_DISABLED[@]}"; do
unit=$(printf "$unit")
systemctl --global disable $unit
done
fi