Dave's Brain

Browse - Programming Tips - How I can use Apache Ant to restart a service?

Date: 2014dec22
Product: ant
Language: Java, xml
OS: Linux
Distro: RedHat/Fedora/CentOS

Q.  How I can use Apache Ant to restart a service?

A.  Use exec like this:

<exec executable="systemctl"> <arg value="restart"/> <arg value="myservice"/> <!-- replace with the service you want to restart --> </exec>

Add a comment

Sign in to add a comment
Copyright © 2008-2017, dave - Code samples on Dave's Brain is licensed under the Creative Commons Attribution 2.5 License. However other material, including English text has all rights reserved.