[CentOS] centos 7- boot doesn't wait for startup script to complete

Tue Aug 2 13:28:36 UTC 2016
Jonathan Billings <billings at negate.org>

On Tue, Aug 02, 2016 at 12:56:21PM +0000, KM wrote:
> # used to set up the Myservices onstartup
> [Unit]
> Description=Start and stop Myservices
>
> [Service]
> Type=oneshot
> ExecStart=/etc/init.d/Myservices start
> ExecStop=/etc/init.d/Myservices stop
> RemainAfterExit=yes
>
> [Install]
> WantedBy=multi-user.target

Reformatting so it is readable.

What you probably want to do is to add something to the [Unit] section
to make the completion of the be a requirement for the user login
service.  Something like:

Before=systemd-user-sessions.service

You will most likely also need to add a TimeoutStartSec= to your
[Service] section to give it a longer time to run before systemd times
out the service start.


-- 
Jonathan Billings <billings at negate.org>