For RHEL 7 you can follow the below steps to start stop the Jboss Fuse application as Service
- Open the file karaf-service-template.systemd
- Change the filepaths pointing to the server as needed
[Unit]
Description=fuse63
After=syslog.target network.target
[Service]
EnvironmentFile=/home/jboss/jboss-fuse-6.3.0.redhat-187/bin/setenv
ExecStart=/home/jboss/jboss-fuse-6.3.0.redhat-187/bin/fuse daemon
ExecStop=/home/jboss/jboss-fuse-6.3.0.redhat-187/bin/fuse stop
User=jboss
Group=jboss
SuccessExitStatus=0 143
RestartSec=15
Restart=on-failure
LimitNOFILE=102642
[Install]
WantedBy=multi-user.target
- systemctl status jbossfuse
- systemctl start jbossfuse
- systemctl stop jbossfuse
For RHEL 7 you can follow the below steps to start stop the Jboss Fuse application as Service
- Navigate to the #FUSE_HOME/bin/contrib directory.
- Run the script karaf-service.sh with parameters as described here.
- karaf-service.sh -k $FUSE_HOME -n rootservicename.
- It generates two files rootservicename.service and rootservicename@.service .
- The rootservicename@.service is the template for child containers.
- Suppose you have a child container named child1.
[ Need to review further , consider this work-around ]
- Copy the file rootservicename@.service to /etc/systemd/system as rootservicename@child1.service.
- Edit the file and change the EXEC_START line to point to the admin script as below. ( the default script somehow does not start the child containers , though all the parameters are set )
- ExecStart=/home/jboss/fuse/jboss-fuse-6.3.0.redhat-187/bin/admin start %i
- ExecStart=/home/jboss/fuse/jboss-fuse-6.3.0.redhat-187/bin/admin stop %i
- Excute the command systemctl daemon-reload ( to apply the changes )
- Once you enable the service on systemctl , the child container child1 can now be controlled via systemctl commands , the script will restart the root container before the child assuming that the root container is not running .