I used to create a shell script to start a service if I have to pass arguments to the binary, since it does not support command line arguments in the field
ExecStart in service file.
I worked well except that when I tried to restart a web server with
systemctl restart XXX.service, it failed to listen on the port as the port was being used by another process. That was wired because that port was used by the web server right before I restarted the service. I checked the port state by using
netstat -nalp, found that it was actually being listened by the web server. I did run restart and I was pretty sure the service is down because its status is