I'm wondering how to stop all units that are grouped together by the same target.
My setup is as follows. I have several unit config files that read:
[Unit]
...
[Service]
...
[Install]
WantedBy=mycustom.target
When I run
# systemctl start mycustom.target
Those units that "are wanted by" mycustom.target
start correctly. Now, I would also like to be able stop all units that are wanted by mycustom.target
. I tried:
# systemctl stop mycustom.target
This doesn't do anything though. Is there a way to make this work without having to stop all units that are (explicitly) wanted by the same target?