Build opentelemetry-cpp results in errors - cmake

I am trying to compile opentelementry-cpp project (https://github.com/open-telemetry/opentelemetry-cpp) but it results in errors.
This are the commands I am running:
RUN git clone -b v1.1.1 https://github.com/open-telemetry/opentelemetry-cpp otel && \
cd /root/otel && \
git submodule update --init
RUN export LD_LIBRARY_PATH=/opt/grpc/lib/:/opt/protobuf/lib64:/opt/zlib/lib:$LD_LIBRARY_PATH && \
source /opt/rh/devtoolset-10/enable && \
cd /root/otel && \
mkdir build && \
cd build && \
cmake3 \
-DCMAKE_INSTALL_PREFIX:PATH=/opt/otel \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-DWITH_ZIPKIN=OFF \
-DWITH_JAEGER=OFF \
-DBUILD_TESTING=OFF \
-DWITH_OTLP=ON \
-DWITH_OTLP_GRPC=ON \
-DWITH_METRICS_PREVIEW=OFF \
-DWITH_LOGS_PREVIEW=OFF \
-DgRPC_DIR=/opt/grpc/lib/cmake/grpc/ \
-Dnlohmann_json_DIR=/opt/nlohmann_json/lib64/cmake/nlohmann_json/ \
-DProtobuf_INCLUDE_DIR=/opt/protobuf/include \
-DProtobuf_LIBRARY=/opt/protobuf/lib64/libprotoc.so \
-DProtobuf_PROTOC_LIBRARY=/opt/protobuf/lib64/libprotoc.sos \
-DPROTOBUF_PROTOC_EXECUTABLE=/opt/protobuf/bin/protoc \
-Dc-ares_DIR=/opt/cares/lib64/cmake/c-ares \
-Dabsl_DIR=/opt/abseil-cpp/lib64/cmake/absl \
-Dre2_DIR=/opt/re2/lib64/cmake/re2 \
-DCMAKE_CXX_FLAGS=-I/opt/grpc/include\ -I/opt/abseil-cpp/include \
.. && \
make && \
make install
The error I get in the end is this:
#19 65.08 [ 74%] Building CXX object examples/grpc/CMakeFiles/server.dir/server.cc.o
#19 71.59 [ 75%] Linking CXX executable server
#19 71.65 /opt/rh/devtoolset-10/root/usr/libexec/gcc/x86_64-redhat-linux/10/ld: CMakeFiles/server.dir/server.cc.o: undefined reference to symbol '_ZN6google8protobuf8internal14ArenaStringPtr3SetENS2_12EmptyDefaultERKSsPNS0_5ArenaE'
#19 71.65 /opt/rh/devtoolset-10/root/usr/libexec/gcc/x86_64-redhat-linux/10/ld: /opt/protobuf/lib64/libprotobuf.so.3.15.8.0: error adding symbols: DSO missing from command line
#19 71.65 collect2: error: ld returned 1 exit status
#19 71.65 make[2]: *** [examples/grpc/CMakeFiles/server.dir/build.make:155: examples/grpc/server] Error 1
#19 71.65 make[1]: *** [CMakeFiles/Makefile2:1098: examples/grpc/CMakeFiles/server.dir/all] Error 2
#19 71.65 make: *** [Makefile:150: all] Error 2
Any hint how to solve this problem?

Related

apache installation of latest version in solaris machine

I am trying to install apache version:2.4.54,
./configure --prefix= -with-included-apr --with-apr-util= --with-pcre=
Congiration completed successfully.
installation for apr(1.7.0),apr-util(version:1.6.1),pcre (version : 2-10.40) is successful.
facing below issue while make in the path (httpd/server):
/home/httpd/srclib/apr/libtool --silent --mode=compile gcc -std=gnu99 -g -O2 -DSOLARIS2=10 -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -D_LARGEFILE64_SOURCE -I. -I/home/httpd/os/unix -I/home/httpd/include -I/home/httpd/srclib/apr/include -I/home/httpd/srclib/apr-util/include -I/home/pcre/include -I/home/httpd/modules/aaa -I/home/httpd/modules/cache -I/home/httpd/modules/core -I/home/httpd/modules/database -I/home/httpd/modules/filters -I/home/httpd/modules/ldap -I/home/httpd/modules/loggers -I/home/httpd/modules/lua -I/home/httpd/modules/proxy -I/home/httpd/modules/http2 -I/home/httpd/modules/session -I/home/httpd/modules/ssl -I/home/httpd/modules/test -I/home/httpd/server -I/home/httpd/modules/md -I/home/httpd/modules/arch/unix -I/home/httpd/modules/dav/main -I/home/httpd/modules/generators -I/home/httpd/modules/mappers -prefer-non-pic -static -c util.c && touch util.lo
/usr/ccs/bin/as: "/var/tmp//ccl7Uxwi.s", line 37236: error: statement syntax
/usr/ccs/bin/as: "/var/tmp//ccl7Uxwi.s", line 37236: error: statement syntax
/usr/ccs/bin/as: "/var/tmp//ccl7Uxwi.s", line 37236: error: statement syntax
*** Error code 1
make: Fatal error: Command failed for target `util.lo'
Current working directory /home/httpd/server
*** Error code 1
The following command caused the error:
otarget=`echo all-recursive|sed s/-recursive//`; \
list=' mpm'; \
for i in $list; do \
if test -d "$i"; then \
target="$otarget"; \
echo "Making $target in $i"; \
if test "$i" = "."; then \
made_local=yes; \
target="local-$target"; \
fi; \
(cd $i && make $target) || exit 1; \
fi; \
done; \
if test "$otarget" = "all" && test -z 'delete-exports libmain.la export_vars.h httpd.exp'; then \
made_local=yes; \
fi; \
if test "$made_local" != "yes"; then \
make "local-$otarget" || exit 1; \
fi
make: Fatal error: Command failed for target `all-recursive'```
Any Solution for the issue.
installation is done in solaris machine.

using EXTRA_OECMAKE doesn't have any effect in cmake variable in bitbake recipe

I wanted to add my application in a yocto Image and I used this recipe:
DESCRIPTION = "my application"
SECTION = "examples"
LICENSE = "CLOSED"
PR = "r0"
DEPENDS += "opencv"
SRC_URI = "git://address/to/myApplication.git;protocol=https;tag=v0.1"
inherit pkgconfig cmake
after running bitbake my-application, I faced this error:
fatal error: string: No such file or directory #include <string>
I searched on the internet and I found that I need to pass this variable to my CMake in my recipe:
EXTRA_OECMAKE += "-DCMAKE_NO_SYSTEM_FROM_IMPORTED=ON"
but nothing had changed. again I faced the error. then I decided to add the variable to my CMake:
set(CMAKE_NO_SYSTEM_FROM_IMPORTED ON)
after my next try, everything got fine and I didn't face any error.
I opened cmake.bbclass file and I saw these lines in a cmake_do_configure() function:
cmake \
${OECMAKE_GENERATOR_ARGS} \
$oecmake_sitefile \
${OECMAKE_SOURCEPATH} \
-DCMAKE_INSTALL_PREFIX:PATH=${prefix} \
-DCMAKE_INSTALL_BINDIR:PATH=${#os.path.relpath(d.getVar('bindir'), d.getVar('prefix') + '/')} \
-DCMAKE_INSTALL_SBINDIR:PATH=${#os.path.relpath(d.getVar('sbindir'), d.getVar('prefix') + '/')} \
-DCMAKE_INSTALL_LIBEXECDIR:PATH=${#os.path.relpath(d.getVar('libexecdir'), d.getVar('prefix') + '/')} \
-DCMAKE_INSTALL_SYSCONFDIR:PATH=${sysconfdir} \
-DCMAKE_INSTALL_SHAREDSTATEDIR:PATH=${#os.path.relpath(d.getVar('sharedstatedir'), d. getVar('prefix') + '/')} \
-DCMAKE_INSTALL_LOCALSTATEDIR:PATH=${localstatedir} \
-DCMAKE_INSTALL_LIBDIR:PATH=${#os.path.relpath(d.getVar('libdir'), d.getVar('prefix') + '/')} \
-DCMAKE_INSTALL_INCLUDEDIR:PATH=${#os.path.relpath(d.getVar('includedir'), d.getVar('prefix') + '/')} \
-DCMAKE_INSTALL_DATAROOTDIR:PATH=${#os.path.relpath(d.getVar('datadir'), d.getVar('prefix') + '/')} \
-DCMAKE_INSTALL_SO_NO_EXE=0 \
-DCMAKE_TOOLCHAIN_FILE=${WORKDIR}/toolchain.cmake \
-DCMAKE_NO_SYSTEM_FROM_IMPORTED=1 \
${EXTRA_OECMAKE} \
-Wno-dev
by default CMAKE_NO_SYSTEM_FROM_IMPORTED is set to 1. therefor, logically I don't need to set this variable in my recipe or cmake.
why EXTRA_OECMAKE and CMake cmake_do_configure() didn't work correctly?
I checked my cmake, and I am sure that I didn't change any CXX flags in it.

compile httpd-2.4.20 in Solaris 11.3 make fails

I'm trying to compile httpd-2.4.20 in Solaris 11.3 box. ./configure doesn't give any error. But make gives an error and I don't know how to fix it. No simmilar question found in stackoverflow or google search. My commands are as follows.
root#LDOM01-test:/data/software/httpd-2.4.20# uname -ar
SunOS LDOM01-test 5.11 11.3 sun4v sparc sun4v
root#LDOM01-test:/data/software/httpd-2.4.20# gcc --version
gcc (GCC) 4.8.2
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
root#LDOM01-test:/data/software/httpd-2.4.20# ./configure --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr
....
....
....
root#LDOM01-test:/data/software/httpd-2.4.20# make
.....
.....
.....
/usr/local/apr/build-1/libtool --silent --mode=compile gcc -std=gnu99 -g -O2 -DSOLARIS2=11 -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -D_LARGEFILE64_SOURCE -I. -I/data/software/httpd-2.4.20/os/unix -I/data/software/httpd-2.4.20/include -I/usr/local/apr/include/apr-1 -I/usr/include/pcre -I/data/software/httpd-2.4.20/modules/aaa -I/data/software/httpd-2.4.20/modules/cache -I/data/software/httpd-2.4.20/modules/core -I/data/software/httpd-2.4.20/modules/database -I/data/software/httpd-2.4.20/modules/filters -I/data/software/httpd-2.4.20/modules/ldap -I/data/software/httpd-2.4.20/modules/loggers -I/data/software/httpd-2.4.20/modules/lua -I/data/software/httpd-2.4.20/modules/proxy -I/data/software/httpd-2.4.20/modules/session -I/data/software/httpd-2.4.20/modules/ssl -I/data/software/httpd-2.4.20/modules/test -I/data/software/httpd-2.4.20/server -I/data/software/httpd-2.4.20/modules/arch/unix -I/data/software/httpd-2.4.20/modules/dav/main -I/data/software/httpd-2.4.20/modules/generators -I/data/software/httpd-2.4.20/modules/mappers -prefer-pic -c regexp.c && touch regexp.slo
/usr/local/apr/build-1/libtool --silent --mode=link gcc -std=gnu99 -g -O2 -o mod_sed.la -rpath /usr/local/apache2/modules -module -avoid-version mod_sed.lo sed0.lo sed1.lo regexp.lo -export-symbols-regex sed_module
/usr/local/apr/build-1/libtool[1086]: eval: syntax error at line 1: `|' unexpected
*** Error code 3
make: Fatal error: Command failed for target `mod_sed.la'
Current working directory /data/software/httpd-2.4.20/modules/filters
*** Error code 1
The following command caused the error:
if test `pwd` = "/data/software/httpd-2.4.20"; then \
echo "" ; \
fi; \
list=''; for i in $list; do \
target="shared-build"; \
if test "$i" = "."; then \
made_local=yes; \
target="local-shared-build"; \
fi; \
if test "$i" != "srclib"; then \
(cd $i && make $target) || exit 1; \
fi; \
done; \
if test -f 'modules.mk'; then \
if test -n 'mod_buffer.la mod_ratelimit.la mod_reqtimeout.la mod_ext_filter.la mod_request.la mod_include.la mod_filter.la mod_substitute.la mod_sed.la mod_deflate.la'; then \
echo "Building shared: mod_buffer.la mod_ratelimit.la mod_reqtimeout.la mod_ext_filter.la mod_request.la mod_include.la mod_filter.la mod_substitute.la mod_sed.la mod_deflate.la"; \
if test "$made_local" != "yes"; then \
make "local-shared-build" || exit 1; \
fi; \
fi; \
fi; \
if test `pwd` = "/data/software/httpd-2.4.20"; then \
echo "" ; \
fi
make: Fatal error: Command failed for target `shared-build-recursive'
Current working directory /data/software/httpd-2.4.20/modules/filters
*** Error code 1
The following command caused the error:
if test `pwd` = "/data/software/httpd-2.4.20"; then \
echo "" ; \
fi; \
list='aaa cache core database debugging filters http loggers metadata proxy session slotmem ssl proxy/balancers arch/unix dav/main generators dav/fs mappers'; for i in $list; do \
target="shared-build"; \
if test "$i" = "."; then \
made_local=yes; \
target="local-shared-build"; \
fi; \
if test "$i" != "srclib"; then \
(cd $i && make $target) || exit 1; \
fi; \
done; \
if test -f 'modules.mk'; then \
if test -n ''; then \
echo "Building shared: "; \
if test "$made_local" != "yes"; then \
make "local-shared-build" || exit 1; \
fi; \
fi; \
fi; \
if test `pwd` = "/data/software/httpd-2.4.20"; then \
echo "" ; \
fi
make: Fatal error: Command failed for target `shared-build-recursive'
Current working directory /data/software/httpd-2.4.20/modules
*** Error code 1
The following command caused the error:
if test `pwd` = "/data/software/httpd-2.4.20"; then \
echo "" ; \
fi; \
list='srclib os server modules support'; for i in $list; do \
target="shared-build"; \
if test "$i" = "."; then \
made_local=yes; \
target="local-shared-build"; \
fi; \
if test "$i" != "srclib"; then \
(cd $i && make $target) || exit 1; \
fi; \
done; \
if test -f 'modules.mk'; then \
if test -n ''; then \
echo "Building shared: "; \
if test "$made_local" != "yes"; then \
make "local-shared-build" || exit 1; \
fi; \
fi; \
fi; \
if test `pwd` = "/data/software/httpd-2.4.20"; then \
echo "" ; \
fi
make: Fatal error: Command failed for target `shared-build-recursive'
Current working directory /data/software/httpd-2.4.20
*** Error code 1
The following command caused the error:
otarget=`echo all-recursive|sed s/-recursive//`; \
list=' srclib os server modules support'; \
for i in $list; do \
if test -d "$i"; then \
target="$otarget"; \
echo "Making $target in $i"; \
if test "$i" = "."; then \
made_local=yes; \
target="local-$target"; \
fi; \
(cd $i && make $target) || exit 1; \
fi; \
done; \
if test "$otarget" = "all" && test -z 'httpd shared-build '; then \
made_local=yes; \
fi; \
if test "$made_local" != "yes"; then \
make "local-$otarget" || exit 1; \
fi
make: Fatal error: Command failed for target `all-recursive'
After the ./configure ....
edit the apr libtool srclib/apr/libtool and remove \$global_symbol_pipe | from following line
# The commands to list exported symbols.
export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols"
>>>>>
export_symbols_cmds="\$NM \$libobjs \$convenience | \$SED 's/.* //' | sort | uniq > \$export_symbols"
Then gmake.
(Thanks Andrew Henle)
Solaris 11.3 /usr/bin/nm was the problem. I changed it to gnm using environment variable and it solved all problems.
export NM=/usr/bin/gnm;
Use gmake instead of make.
Many, many projects implicitly require the use of GNU make.

error mod_ssl requires OpenSSL 0.9.8a or later

I am trying install apache 2.4.7 in Solaris machine. First I did the configuration using
./configure
Then, When I do make. after some successful statements it throws me following error.
In file included from mod_ssl.c:27:
ssl_private.h:109:2: #error mod_ssl requires OpenSSL 0.9.8a or later
*** Error code 1
make: Fatal error: Command failed for target `mod_ssl.slo'
Current working directory /var/spool/pkg/httpd-2.4.7/modules/ssl
*** Error code 1
The following command caused the error:
if test `pwd` = "/var/spool/pkg/httpd-2.4.7"; then \
echo "" ; \
fi; \
list=''; for i in $list; do \
target="shared-build"; \
if test "$i" = "."; then \
made_local=yes; \
target="local-shared-build"; \
fi; \
if test "$i" != "srclib"; then \
(cd $i && make $target) || exit 1; \
fi; \
done; \
if test -f 'modules.mk'; then \
if test -n 'mod_ssl.la'; then \
echo "Building shared: mod_ssl.la"; \
if test "$made_local" != "yes"; then \
make "local-shared-build" || exit 1; \
fi; \
fi; \
fi; \
if test `pwd` = "/var/spool/pkg/httpd-2.4.7"; then \
echo "" ; \
fi
make: Fatal error: Command failed for target `shared-build-recursive'
Current working directory /var/spool/pkg/httpd-2.4.7/modules/ssl
*** Error code 1
The following command caused the error:
if test `pwd` = "/var/spool/pkg/httpd-2.4.7"; then \
echo "" ; \
fi; \
list='aaa cache core database debugging filters http loggers metadata proxy session slotmem ssl proxy/balancers arch/unix dav/main generators dav/fs mappers'; for i in $list; do \
target="shared-build"; \
if test "$i" = "."; then \
made_local=yes; \
target="local-shared-build"; \
fi; \
if test "$i" != "srclib"; then \
(cd $i && make $target) || exit 1; \
fi; \
done; \
if test -f 'modules.mk'; then \
if test -n ''; then \
echo "Building shared: "; \
if test "$made_local" != "yes"; then \
make "local-shared-build" || exit 1; \
fi; \
fi; \
fi; \
if test `pwd` = "/var/spool/pkg/httpd-2.4.7"; then \
echo "" ; \
fi
make: Fatal error: Command failed for target `shared-build-recursive'
Current working directory /var/spool/pkg/httpd-2.4.7/modules
*** Error code 1
The following command caused the error:
if test `pwd` = "/var/spool/pkg/httpd-2.4.7"; then \
echo "" ; \
fi; \
list='srclib os server modules support'; for i in $list; do \
target="shared-build"; \
if test "$i" = "."; then \
made_local=yes; \
target="local-shared-build"; \
fi; \
if test "$i" != "srclib"; then \
(cd $i && make $target) || exit 1; \
fi; \
done; \
if test -f 'modules.mk'; then \
if test -n ''; then \
echo "Building shared: "; \
if test "$made_local" != "yes"; then \
make "local-shared-build" || exit 1; \
fi; \
fi; \
fi; \
if test `pwd` = "/var/spool/pkg/httpd-2.4.7"; then \
echo "" ; \
fi
make: Fatal error: Command failed for target `shared-build-recursive'
Current working directory /var/spool/pkg/httpd-2.4.7
*** Error code 1
The following command caused the error:
otarget=`echo all-recursive|sed s/-recursive//`; \
list=' srclib os server modules support'; \
for i in $list; do \
if test -d "$i"; then \
target="$otarget"; \
echo "Making $target in $i"; \
if test "$i" = "."; then \
made_local=yes; \
target="local-$target"; \
fi; \
(cd $i && make $target) || exit 1; \
fi; \
done; \
if test "$otarget" = "all" && test -z 'httpd shared-build '; then \
made_local=yes; \
fi; \
if test "$made_local" != "yes"; then \
make "local-$otarget" || exit 1; \
fi
make: Fatal error: Command failed for target `all-recursive'
The same above error is coming even after I install latest openssl version.
OpenSSL 1.0.1f 6 Jan 2014
Please help me to resolve this issue.
I solved this by installing the development package for open ssl: "sudo apt-get install libssl-dev"
You're probably unintentionally trying to link against Oracle's outdated OpenSSL in /usr/sfw/lib. You may need to explicitly specify the path to your copy of OpenSSL 1.0.1f in your httpd configure command, e.g., "--with-ssl=/path/to/openssl".

how to start jboss in background

i'm using centos 6 and jboss 7.1.1 final. i using this command to start jboss:./domain.sh,when it start,it output a lot of logs,and the worst thing is just when i disconnect the ssh,the server is down.i've already tried another command ./domain.sh & ,nothing changes.
in the domain.sh,it says,
if [ "x$LAUNCH_JBOSS_IN_BACKGROUND" = "x" ]; then
# Execute the JVM in the foreground
eval \"$JAVA\" -D\"[Process Controller]\" $PROCESS_CONTROLLER_JAVA_OPTS \
\"-Dorg.jboss.boot.log.file=$JBOSS_LOG_DIR/process-controller.log\" \
\"-Dlogging.configuration=file:$JBOSS_CONFIG_DIR/logging.properties\" \
-jar \"$JBOSS_HOME/jboss-modules.jar\" \
-mp \"${JBOSS_MODULEPATH}\" \
org.jboss.as.process-controller \
-jboss-home \"$JBOSS_HOME\" \
-jvm \"$JAVA_FROM_JVM\" \
-mp \"${JBOSS_MODULEPATH}\" \
-- \
\"-Dorg.jboss.boot.log.file=$JBOSS_LOG_DIR/host-controller.log\" \
\"-Dlogging.configuration=file:$JBOSS_CONFIG_DIR/logging.properties\" \
$HOST_CONTROLLER_JAVA_OPTS \
-- \
-default-jvm \"$JAVA_FROM_JVM\" \
"$#"
JBOSS_STATUS=$?
else
# Execute the JVM in the background
eval \"$JAVA\" -D\"[Process Controller]\" $PROCESS_CONTROLLER_JAVA_OPTS \
\"-Dorg.jboss.boot.log.file=$JBOSS_LOG_DIR/process-controller.log\" \
\"-Dlogging.configuration=file:$JBOSS_CONFIG_DIR/logging.properties\" \
-jar \"$JBOSS_HOME/jboss-modules.jar\" \
-mp \"${JBOSS_MODULEPATH}\" \
org.jboss.as.process-controller \
-jboss-home \"$JBOSS_HOME\" \
-jvm \"$JAVA_FROM_JVM\" \
-mp \"${JBOSS_MODULEPATH}\" \
-- \
\"-Dorg.jboss.boot.log.file=$JBOSS_LOG_DIR/host-controller.log\" \
\"-Dlogging.configuration=file:$JBOSS_CONFIG_DIR/logging.properties\" \
$HOST_CONTROLLER_JAVA_OPTS \
-- \
-default-jvm \"$JAVA_FROM_JVM\" \
"$#" "&"
JBOSS_PID=$!
# Trap common signals and relay them to the jboss process
trap "kill -HUP $JBOSS_PID" HUP
trap "kill -TERM $JBOSS_PID" INT
trap "kill -QUIT $JBOSS_PID" QUIT
trap "kill -PIPE $JBOSS_PID" PIPE
trap "kill -TERM $JBOSS_PID" TERM
if [ "x$JBOSS_PIDFILE" != "x" ]; then
echo $JBOSS_PID > $JBOSS_PIDFILE
fi
# Wait until the background process exits
WAIT_STATUS=128
while [ "$WAIT_STATUS" -ge 128 ]; do
wait $JBOSS_PID 2>/dev/null
WAIT_STATUS=$?
if [ "$WAIT_STATUS" -gt 128 ]; then
SIGNAL=`expr $WAIT_STATUS - 128`
SIGNAL_NAME=`kill -l $SIGNAL`
echo "*** JBossAS process ($JBOSS_PID) received $SIGNAL_NAME signal ***" >&2
fi
done
if [ "$WAIT_STATUS" -lt 127 ]; then
JBOSS_STATUS=$WAIT_STATUS
else
JBOSS_STATUS=0
fi
if [ "$JBOSS_STATUS" -ne 10 ]; then
# Wait for a complete shudown
wait $JBOSS_PID 2>/dev/null
fi
if [ "x$JBOSS_PIDFILE" != "x" ]; then
grep "$JBOSS_PID" $JBOSS_PIDFILE && rm $JBOSS_PIDFILE
fi
fi
if [ "$JBOSS_STATUS" -eq 10 ]; then
echo "Restarting JBoss..."
else
exit $JBOSS_STATUS
fi
i tried to remove the if clause,but there is no miracle
or how to install the jboss 7 as service.thanks a lot.
Here comes the implementation of Xientd service. Try to run the script as a daemon/service. Try to add your own service with Xientd. Once you have started or triggered the service, It will run in the server even you have closed the SSH. See the followings links to get further awareness to set up your own service.
link1
link2
link3
These are comes with pure Linux administration stuffs but easy create your own. You should select a port dedicated for this service and make sure to open this port via firewall.
I hope this will help you