I have three systemd services (Docker containers, but that is not important). All three of these services has to be running for the application to be fully functional.
In order to simplify procedures for the ops team I've created a forth systemd service to group them all together using the
PartOf directives. Starting and stopping this forth service will now start and stop the three containers in the correct order.
The last challenge is to get the forth systemd service to show the correct status. Right now it shows "loaded / inactive" after booting up the services. Is it possible to configure it in a way that it will show "loaded / active" when and only when the three first services are up and running?
[Unit] Description=This is the group Requires=a.service b.service c.service [Service] ExecStart=/bin/echo "Starting" ExecStop=/bin/echo "Stopping" [Install] WantedBy=local.target