Red HatThis forum is for the discussion of Red Hat Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi,
I am using RHEL 6.1 serverand I just make a shell to start my jboss 5.1 application server. I have to add this shell in chkconfig also to autometically start/stop. when i run it "./jboss", it is working well but when I encrypt this file with SHC program, this is giving error. here is the code of my shell:
case "$1" in
start)
echo -e "Starting Jboss Application Server\n"
#To run it as root:
/opt/jboss-eap-5.1/jboss-as/bin/run.sh -b 0.0.0.0 > /dev/null 2>&1 &
;;
stop)
echo -e "Stopping Java Application Server\n"
#To run it as root:
kill -9 `pidof java`
;;
restart|force-reload)
java_pid=`pidof java`
if [ "$java_pid" != "" ]; then
$0 stop
sleep 1
fi
$0 start
;;
status)
java_pid=`pidof java`
if [ "$java_pid" != "" ]; then
echo "Jboss Application Server is Running with PID $java_pid"
else
echo "Jboss Application Server is Not Running"
fi
;;
*)
echo "Usage: /etc/init.d/jboss {start|stop|restart|status}"
exit 1
esac
exit 0
==========================================================================
after encryption with "shc -f <filename>", after this shc give me 2 files named jboss.x and jboss.x.c when i m trying "./jboss.x status". it returns,
./jboss.x status
[1]+ Stopped ./jboss.x status
and when check process. it shows:
# ps -ef |grep jboss
root 26186 25811 0 03:24 pts/1 00:00:00 ./jboss.x status
root 26187 26186 0 03:24 pts/1 00:00:00 [jboss.x] <defunct>
root 26191 25811 0 03:25 pts/1 00:00:00 grep jboss
=======================================================================
Please guide me where i done mistake........
IMHO right from the start by ignoring the provided bin/jboss_init_redhat.sh (or wheel re-invention-wise other solutions provided) and using SHC without any particular reason.
Quote:
Originally Posted by h.dilshad
I am using RHEL 6.1 server
...which is two updates behind. RHEL 6 has been at U3 for some time now.
IMHO right from the start by ignoring the provided bin/jboss_init_redhat.sh (or wheel re-invention-wise other solutions provided) and using SHC without any particular reason.
...which is two updates behind. RHEL 6 has been at U3 for some time now.
Thanks unSpawn, Actually I want to hide my codes from my customers, that why I use SHC. thanks for ur support. But solved my problem with this command.
shc -r -T -f <file name>. Now it working.
It's not like you're "protecting" a password (see limitations) or whatever else super secret. That makes it unnecessary obfuscation (you're not thinking you can somehow bind your customers to you with such practices, right?) and that's IMHO against what Open Source Software stands for.
I don't see any valid and compelling reason to be doing this.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.