Merge pull request #42 from zelikos/systemd-disable-first

fix(systemd): Force-enable services, use --global for user services
This commit is contained in:
gerblesh 2023-09-18 18:51:41 -07:00 committed by GitHub
commit a40bcab274
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -12,7 +12,7 @@ get_yaml_array USER_DISABLED '.user.disabled[]' "$1"
if [[ ${#ENABLED[@]} -gt 0 ]]; then
for unit in "${ENABLED[@]}"; do
unit=$(printf "$unit")
systemctl enable $unit
systemctl -f enable $unit
done
fi
if [[ ${#DISABLED[@]} -gt 0 ]]; then
@ -24,12 +24,12 @@ fi
if [[ ${#USER_ENABLED[@]} -gt 0 ]]; then
for unit in "${USER_ENABLED[@]}"; do
unit=$(printf "$unit")
systemctl --user enable $unit
systemctl --global -f enable $unit
done
fi
if [[ ${#USER_DISABLED[@]} -gt 0 ]]; then
for unit in "${USER_DISABLED[@]}"; do
unit=$(printf "$unit")
systemctl --user disable $unit
systemctl --global disable $unit
done
fi