King David asked:
rhel 7.2 machine
server have the following service
[[email protected] system]# more rc_build_infra.service [Unit] Description=infra Manager Server Requires=network.target remote-fs.target After=network.target remote-fs.target [Service] Restart=on-failure StartLimitInterval=5min StartLimitBurst=4 LimitMEMLOCK=infinity LimitNOFILE=65535 Type=simple User=infra_bb Group=mc_group Environment=JAVA_HOME=/usr/bin/java ExecStart=/opt/infra_start.sh [Install] WantedBy=multi-user.target
now I want to build the a similar service but the new service should be execute after –
what are the configuration that should be in the new service
so new service will execute during machine boot after –
That is simple. You would just use
After= in the
[Unit] section to declare your desired service order. You can see that your existing unit already does this.
Depending on the nature of the dependencies between your services, you may also need to declare
BindsTo=. See the documentation for their semantics and you will be able to determine if your scenario requires either of these.
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.