In the Java directory there are the following files:
[lem@linux linux]$ ls -al /opt/jre*/bin
total 1464
drwxr-xr-x 2 root root 4096 Dec 15 07:34 .
drwxr-xr-x 7 root root 4096 Dec 15 07:34 ..
-rwxr-xr-x 1 root root 4153 Dec 15 07:12 ControlPanel
-rwxr-xr-x 1 root root 65076 Dec 15 06:06 java
-rwxr-xr-x 1 root root 25730 Dec 15 07:12 java_vm
-rwxr-xr-x 1 root root 175978 Dec 15 07:12 javaws
-rwxr-xr-x 1 root root 62356 Dec 15 06:19 keytool
-rwxr-xr-x 1 root root 62388 Dec 15 06:19 kinit
-rwxr-xr-x 1 root root 62388 Dec 15 06:20 klist
-rwxr-xr-x 1 root root 62388 Dec 15 06:20 ktab
-rwxr-xr-x 1 root root 62580 Dec 15 06:49 orbd
-rwxr-xr-x 1 root root 62388 Dec 15 06:51 pack200
-rwxr-xr-x 1 root root 62588 Dec 15 06:19 policytool
-rwxr-xr-x 1 root root 62356 Dec 15 06:43 rmid
-rwxr-xr-x 1 root root 62356 Dec 15 06:43 rmiregistry
-rwxr-xr-x 1 root root 62356 Dec 15 06:50 servertool
-rwxr-xr-x 1 root root 62580 Dec 15 06:49 tnameserv
-rwxr-xr-x 1 root root 357373 Dec 15 06:50 unpack200
I don't know what I am looking at when I look at the install-services so I am just going to post what is in it to see if you guys can make heads of it
[lem@linux linux]$ more install-service
#!/bin/bash
#
# This script will attempt to install SSL Explorer as a Linux
# service. The method of doing this differs between distributions
# so an attempt is made to guess the O/S
# Display user
usage() {
echo "usage: $0 [-o <os>] [-j <java-home>] [-n|-u] [-c <wrapper-conf>]"
}
set_wrapper_property() {
CONFFILE="${WRAPPER_CONF:-$SSLEXPLORER_HOME/conf/wrapper.conf}"
NAME="$1"
shift
VAL="$*"
FOUND=n
while read line
do
case "${line}" in
"${NAME}="*) echo "${NAME}=${VAL}"
FOUND=y ;;
*) echo "${line}" ;;
esac
done < "${CONFFILE}" > /tmp/wrapper.conf
if [ "${FOUND}" = n ]
then echo "${NAME}=${VAL}" >> /tmp/wrapper.conf
fi
cat /tmp/wrapper.conf > "${CONFFILE}" 2>/dev/null
rm -f /tmp/wrapper.conf
}
help() {
usage
echo
echo "Option"
echo " -o <os> Force operating system. Can currently"
echo " either be redhat,slackware,smoothwall,suse,debia
n,conary."
echo " -n Install the service NOT to start at boot."
echo " -u Uninstall service."
echo " -c <wrapper-conf> Location of wrapper configuration."
}
install_slackware_service() {
RC_INSTALLED=n
if [ -f /etc/rc.d/rc.sslexplorer ]
then line=$(grep "exec ${SSLEXPLORER_HOME}/install/platforms/linux/sslexplore
r" /etc/rc.d/rc.sslexplorer)
if [ -n "${line}" ]
then RC_INSTALLED=y
fi
fi
if [ "${RC_INSTALLED}" = "n" ]
then echo "#!/bin/bash
#
# Init file for SSL Explorer daemon
#
if [ -f /etc/sslexplorer/service.conf ]
then source /etc/sslexplorer/service.conf
fi
exec ${SSLEXPLORER_HOME}/install/platforms/linux/sslexplorer \$*" > /etc/rc.d/rc
.sslexplorer
fi
chmod a+rx /etc/rc.d/rc.sslexplorer
set_wrapper_property "wrapper.java.command" "${JAVA_HOME}/bin/java"
set_wrapper_property "wrapper.working.dir" ${SSLEXPLORER_HOME}
set_wrapper_property "wrapper.java.library.path.1" ${SSLEXPLORER_HOME}/
install/platforms/linux
if [ -f /etc/rc.d/rc.local ]
then grep -v "\# Added by SSL Explorer install-service" /etc/rc.d/rc.local >
/tmp/rc.local.tmp
else echo "#!/bin/bash" > /etc/rc.d/rc.local.tmp
fi
echo "if [ -x /etc/rc.d/rc.sslexplorer ] # Added by SSL Explorer install-
service" >> /tmp/rc.local.tmp
echo "then sh /etc/rc.d/rc.sslexplorer start # Added by SSL Explorer install-
service" >> /tmp/rc.local.tmp
echo "fi # Added by SSL Explorer install-
service" >> /tmp/rc.local.tmp
mv /tmp/rc.local.tmp /etc/rc.d/rc.local
if [ "${START_ON_BOOT}" = y ]
then chmod a+rx /etc/rc.d/rc.local
else chmod a-rx /etc/rc.d/rc.local
fi
}
uninstall_slackware_service() {
if [ -f /etc/rc.d/rc.local ]
then grep -v "\# Added by SSL Explorer install-service" /etc/rc.d/rc.local >
/tmp/rc.local.tmp
mv /tmp/rc.local.tmp /etc/rc.d/rc.local
fi
rm -f /etc/rc.d/rc.sslexplorer
}
install_suse_service() {
echo "#!/bin/bash
#
### BEGIN INIT INFO
# Provides: SSL Explorer daemon
# Required-Start: $syslog $remote_fs $network
# X-UnitedLinux-Should-Start: $named $syslog $time
# Required-Stop: $syslog $remote_fs $network
# X-UnitedLinux-Should-Stop: $named $syslog
# Default-Start: 3 5
# Default-Stop: 0 1 2 6
# Short-Description: SSL Explorer
# Description: Start SSL Explorer to activate client's VPN access
#
# pidfile: /var/lock/subsys/sslexplorer.pid
# processname: wrapper
### END INIT INFO
exec ${SSLEXPLORER_HOME}/install/platforms/linux/sslexplorer \$*" > /etc/init.d/
sslexplorer
chmod a+rx /etc/init.d/sslexplorer
if [ "${START_ON_BOOT}" = y ]
then if ! chkconfig -a sslexplorer
then echo "Failed to install service." >&2
exit 1
fi
else if ! chkconfig -d sslexplorer
then echo "Failed to uninstall service." >&2
exit 1
fi
fi
set_wrapper_property "wrapper.java.command" "${JAVA_HOME}/bin/java"
set_wrapper_property "wrapper.working.dir" ${SSLEXPLORER_HOME}
set_wrapper_property "wrapper.java.library.path.1" ${SSLEXPLORER_HOME}/insta
ll/platforms/linux
echo "Service installed"
}
uninstall_suse_service() {
if ! chkconfig -d sslexplorer
then echo "Failed to uninstall service." >&2
exit 1
fi
rm -f /etc/init.d/sslexplorer
echo "Service uninstalled"
}
install_debian_service() {
mkdir -p /var/lock/subsys
echo "#!/bin/bash
#
exec ${SSLEXPLORER_HOME}/install/platforms/linux/sslexplorer \$*" > /etc/init.d/
sslexplorer
chmod a+rx /etc/init.d/sslexplorer
if [ "${START_ON_BOOT}" = y ]
then if ! update-rc.d sslexplorer defaults
then echo "Failed to install service." >&2
exit 1
fi
else if ! update-rc.d -f sslexplorer remove
then echo "Failed to uninstall service." >&2
exit 1
fi
fi
set_wrapper_property "wrapper.java.command" "${JAVA_HOME}/bin/java"
set_wrapper_property "wrapper.working.dir" ${SSLEXPLORER_HOME}
set_wrapper_property "wrapper.java.library.path.1" ${SSLEXPLORER_HOME}/insta
ll/platforms/linux
echo "Service installed"
}
uninstall_debian_service() {
if ! update-rc.d -f sslexplorer remove
then echo "Failed to uninstall service." >&2
exit 1
fi
rm -f /etc/init.d/sslexplorer
echo "Service uninstalled"
}
install_smoothwall_service() {
# Hack to make Install4J scripts works
ln -sf /bin/grep /bin/egrep
mkdir -p /var/lock/subsys
echo "#!/bin/bash
#
# Init file for SSL Explorer daemon
#
exec ${SSLEXPLORER_HOME}/install/platforms/linux/sslexplorer \$*" > /etc/rc.d/rc
.sslexplorer
set_wrapper_property "wrapper.java.command" "${JAVA_HOME}/bin/java"
set_wrapper_property "wrapper.working.dir" ${SSLEXPLORER_HOME}
set_wrapper_property "wrapper.java.library.path.1" ${SSLEXPLORER_HOME}/instal
l/platforms/linux
if [ -f /etc/rc.d/rc.sysinit ]
then grep -v "\# Added by SSL Explorer install-service" /etc/rc.d/rc.sysinit
> /tmp/rc.sysinit.tmp
else echo "#!/bin/bash" > /etc/rc.d/rc.sysinit.tmp
fi
echo "if [ -x /etc/rc.d/rc.sslexplorer ] # Added by SSL Explorer install-
service" >> /tmp/rc.sysinit.tmp
echo "then sh /etc/rc.d/rc.sslexplorer start # Added by SSL Explorer install-
service" >> /tmp/rc.sysinit.tmp
echo "fi # Added by SSL Explorer install-
service" >> /tmp/rc.sysinit.tmp
mv /tmp/rc.sysinit.tmp /etc/rc.d/rc.sysinit
chmod a+rx /etc/rc.d/rc.sysinit
if [ "${START_ON_BOOT}" = y ]
then chmod a+rx /etc/rc.d/rc.sslexplorer
else chmod a-rx /etc/rc.d/rc.sslexplorer
fi
}
uninstall_smoothwall_service() {
if [ -f /etc/rc.d/rc.sysinit ]
then grep -v "\# Added by SSL Explorer install-service" /etc/rc.d/rc.sysinit
> /tmp/rc.sysinit.tmp
mv /tmp/rc.sysinit.tmp /etc/rc.d/rc.sysinit
fi
rm -f /etc/rc.d/rc.sslexplorer
}
install_rh_service() {
echo "#!/bin/bash
#
# Init file for SSL Explorer daemon
#
# chkconfig: 345 56 26
# description: SSL Explorer daemon
#
# pidfile: /var/lock/subsys/sslexplorer.pid
# processname: wrapper
exec ${SSLEXPLORER_HOME}/install/platforms/linux/sslexplorer \$*" > /etc/rc.d/in
it.d/sslexplorer
chmod a+rx /etc/rc.d/init.d/sslexplorer
if [ "${START_ON_BOOT}" = y ]
then if ! chkconfig --add sslexplorer --levels 345
then echo "Failed to install service." >&2
exit 1
fi
else if ! chkconfig --del sslexplorer
then echo "Failed to uninstall service." >&2
exit 1
fi
fi
set_wrapper_property "wrapper.java.command" "${JAVA_HOME}/bin/java"
set_wrapper_property "wrapper.working.dir" ${SSLEXPLORER_HOME}
set_wrapper_property "wrapper.java.library.path.1" ${SSLEXPLORER_HOME}/i
nstall/platforms/linux
echo "Service installed"
}
uninstall_rh_service() {
if ! chkconfig --del sslexplorer
then echo "Failed to uninstall service." >&2
exit 1
fi
rm -f /etc/rc.d/init.d/sslexplorer
echo "Service uninstalled"
}
install_conary_service() {
echo "#!/bin/bash
#
# Init file for SSL Explorer daemon
#
# chkconfig: 345 56 26
# description: SSL Explorer daemon
#
# pidfile: /var/lock/subsys/sslexplorer.pid
# processname: wrapper
exec ${SSLEXPLORER_HOME}/install/platforms/linux/sslexplorer \$*" > /etc/rc.d/in
it.d/sslexplorer
chmod a+rx /etc/rc.d/init.d/sslexplorer
if [ "${START_ON_BOOT}" = y ]
then if ! chkconfig --add sslexplorer --levels 345
then echo "Failed to install service." >&2
exit 1
fi
else if ! chkconfig --del sslexplorer
then echo "Failed to uninstall service." >&2
exit 1
fi
fi
set_wrapper_property "wrapper.java.command" "${JAVA_HOME}/bin/java"
set_wrapper_property "wrapper.working.dir" ${SSLEXPLORER_HOME}
set_wrapper_property "wrapper.java.library.path.1" ${SSLEXPLORER_HOME}/i
nstall/platforms/linux
echo "Service installed"
}
uninstall_conary_service() {
if ! chkconfig --del sslexplorer
then echo "Failed to uninstall service." >&2
exit 1
fi
rm -f /etc/rc.d/init.d/sslexplorer
echo "Service uninstalled"
}
# Determine the installed location of SSL Explorer
export DIR=$(dirname ${0})
SSLEXPLORER_HOME=$(cd ${DIR}; cd ../../.. ; pwd)
# Initialise other variables
OS=
START_ON_BOOT=y
UNINSTALL=n
# Determine the O/S
if [ -f /etc/SuSE-release ]
then OS=suse
elif [ -f /etc/redhat-release ]
then OS=redhat
elif [ -f /etc/slackware-version ]
then OS=slackware
elif [ -f /usr/local/bin/smoothiedeath ]
then OS=smoothwall
elif [ -f /etc/debian_version ]
then OS=debian
elif [ -d /etc/conary ]
then OS=conary
fi
# Parse the command line
while [ $# -gt 0 ]
do
case "$1" in
"-j") JAVA_HOME="$2" ; shift ;;
"-o") OS="$2" l shift ; ;;
"-u") UNINSTALL="y" ;;
"-n") START_ON_BOOT="n" ;;
"-c") WRAPPER_CONF="$2" ; shift ;;
"-h") help
exit 0 ;;
*) help
exit 1 ;;
esac
shift
done
if [ "${UNINSTALL}" = "n" ]
then echo "Detecting Java"
if [ -n "${JAVA_HOME}" ]
then if [ ! -d "${JAVA_HOME}" -o ! -f "${JAVA_HOME}/bin/java" ]
then echo " JAVA_HOME points to a missing or invalid Java runtime,"
echo " please set JAVA_HOME environment variable or provide"
echo " -j <java-home> argument."
exit 1
fi
else echo " JAVA_HOME has not been set. Please set JAVA_HOME environment
"
echo " variable or provide -j <java-home> argument."
exit 1
fi
echo " Using ${JAVA_HOME}"
fi
echo "Detect OS ${OS}"
#
case "${OS}" in
suse) if [ "${UNINSTALL}" = y ]
then uninstall_suse_service
else install_suse_service
fi ;;
redhat) if [ "${UNINSTALL}" = y ]
then uninstall_rh_service
else install_rh_service
fi ;;
slackware) if [ "${UNINSTALL}" = y ]
then uninstall_slackware_service
else install_slackware_service
fi ;;
debian) if [ "${UNINSTALL}" = y ]
then uninstall_debian_service
else install_debian_service
fi ;;
smoothwall) if [ "${UNINSTALL}" = y ]
then uninstall_smoothwall_service
else install_smoothwall_service
fi ;;
conary) if [ "${UNINSTALL}" = y ]
then uninstall_conary_service
else install_conary_service
fi ;;
*) echo "OS could not be detected and no valid one specified as an argu
ment." >&2
help ;;
esac
# Clear out the temporary directory
if [ -f "${WRAPPER_CONF}" ]
then temp=$(grep "=--temp=" "${WRAPPER_CONF}"|awk -F= '{ print $3 }')
if [ -z "${temp}" ]
then temp="${SSLEXPLORER_HOME}/tmp"
fi
if [ -d "${temp}" ]
then rm -fr "${temp}/*"
fi
fi
[lem@linux linux]$