Encription of a shell
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: #!/bin/bash # chkconfig: 345 20 80 # description: jbossAS daemon # processname: jbossAS # /etc/init.d/jbossAS 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........ |
Quote:
Quote:
|
Quote:
shc -r -T -f <file name>. Now it working. |
Quote:
I don't see any valid and compelling reason to be doing this. |
This is a good HOWTO http://www.thegeekstuff.com/2012/05/...-shell-script/, but as it says twice(!)
Quote:
Quote:
|
All times are GMT -5. The time now is 11:19 PM. |