1 of 1 people found this helpful
We don't have anything on this so far, but following the simple example provided in the first answer to http://stackoverflow.com/questions/6880902/start-jboss-7-as-a-service-on-linux, it should be pretty easy to build one. Make sure the start phase points to the startServer.sh script. To stop though, we do not have any commands, so remove the stop part from the header and the script itself. If you wanna stop manually, you'll have to do a kill -6. If you get it working, make sure you contribute it back
Thank you for your help, Galder. Based on your recommendation our systems administrator (he's way better in bash scripting than me ) was able to come up with the following solution:
# Init file for Infinispan cache daemon
# chkconfig: 2345 99 25
# description: Infinispan cache daemon
# source function library
case "$1" in
su - infinispan -c '/opt/infinispan/bin/startServer.sh -rhotrod -cconfig.xml' &
sudo -u infinispan kilall java
sudo -u infinispan killall -9 java
echo $"Usage: $0 (start|stop)"
We put this into /etc/init.d on our system & are able to launch infinispan as a service. This may not look very neat, but it works for us in our development environment. Any fixes are welcome & appreciated.