fix(systemd): Run disables before enables
This commit is contained in:
parent
7699cc919c
commit
be8f58a035
1 changed files with 9 additions and 9 deletions
|
|
@ -9,22 +9,16 @@ get_yaml_array USER_ENABLED '.user.enabled[]' "$1"
|
|||
get_yaml_array USER_DISABLED '.user.disabled[]' "$1"
|
||||
|
||||
|
||||
if [[ ${#ENABLED[@]} -gt 0 ]]; then
|
||||
for unit in "${ENABLED[@]}"; do
|
||||
unit=$(printf "$unit")
|
||||
systemctl enable $unit
|
||||
done
|
||||
fi
|
||||
if [[ ${#DISABLED[@]} -gt 0 ]]; then
|
||||
for unit in "${DISABLED[@]}"; do
|
||||
unit=$(printf "$unit")
|
||||
systemctl disable $unit
|
||||
done
|
||||
fi
|
||||
if [[ ${#USER_ENABLED[@]} -gt 0 ]]; then
|
||||
for unit in "${USER_ENABLED[@]}"; do
|
||||
if [[ ${#ENABLED[@]} -gt 0 ]]; then
|
||||
for unit in "${ENABLED[@]}"; do
|
||||
unit=$(printf "$unit")
|
||||
systemctl --user enable $unit
|
||||
systemctl enable $unit
|
||||
done
|
||||
fi
|
||||
if [[ ${#USER_DISABLED[@]} -gt 0 ]]; then
|
||||
|
|
@ -33,3 +27,9 @@ if [[ ${#USER_DISABLED[@]} -gt 0 ]]; then
|
|||
systemctl --user disable $unit
|
||||
done
|
||||
fi
|
||||
if [[ ${#USER_ENABLED[@]} -gt 0 ]]; then
|
||||
for unit in "${USER_ENABLED[@]}"; do
|
||||
unit=$(printf "$unit")
|
||||
systemctl --user enable $unit
|
||||
done
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue