I'm creating a systemd service let's call it B on Ubuntu 16.04 which I'd like on every boot to start after a specific service called A and then run a specific script. So far I've created the service unit file which consists of the following fields:
[Unit]
Description=B
After=A.service
[Service]
ExecStart=/opt/B.sh
[Install]
WantedBy=multi-user.target
Furthermore I'd like the stoppage of service A to trigger the stoppage of service B. Is it valid to do it with the following command in the A service unit file
ExecStop=systemctl stop A.service
or is there another way ? If possible I'd like not to change the existing A service file unit.