Re: centos 7- boot doesn't wait for startup script to complete

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



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@xxxxxxxxxx>
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
https://lists.centos.org/mailman/listinfo/centos



[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux