I have a script that installs and sets up [traffic server](http://trafficserver.apache.org/):

```
yum install -y trafficserver
systemctl start trafficserver

traffic_line -s proxy.config.url_remap.remap_required -v 0
traffic_line -s proxy.config.reverse_proxy.enabled -v 0

```

The problem is, `traffic_line` fails with:

> 
> [connect] ERROR (main\_socket\_fd 3): No such file or directory
>  error: could not connect to management port, make sure traffic\_manager is running
> 
> 
> 

This is because `systemctl start` returns immediately, without waiting for traffic server to be actually started.

**Is there a way to tell `systemctl start` to only return once the service is started?**

If this is not possible, is there a command that I can run after `systemctl start` to actually wait for the service to be started?