autoinstall/autostart-manage/sync_command.sh

12 lines
281 B
Bash
Raw Normal View History

2024-01-08 22:37:31 +00:00
#!/usr/bin/env bash
2024-10-23 20:32:11 +00:00
rm -f "$HOME/.config/systemd/user/autostart.target.wants/"*
2024-01-08 22:37:31 +00:00
autostart_units=()
while IFS='' read -r line
do
2024-10-23 20:32:11 +00:00
autostart_units+=("autostart@$line.service")
done < <(_list "${args[groups]:-}")
2024-01-08 22:37:31 +00:00
2024-10-23 20:32:11 +00:00
systemctl --user add-wants autostart.target "${autostart_units[@]}"