2009-09-22 Sancho Lerena <slerena@artica.es>

* pandora_server_installer: Fixes some problems detecting Linux
        (was skipping tentacle installation).

        * util/tentacle_serverd: Fixed some problems starting tentacle
        because short timeout after starting and because the unquoted grep.

        * util/pandora_server: Incresed sleep time on start.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1965 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
slerena 2009-09-22 10:38:53 +00:00
parent 0f6de3c893
commit 103a83d029
4 changed files with 34 additions and 15 deletions

View File

@ -1,3 +1,13 @@
2009-09-22 Sancho Lerena <slerena@artica.es>
* pandora_server_installer: Fixes some problems detecting Linux
(was skipping tentacle installation).
* util/tentacle_serverd: Fixed some problems starting tentacle
because short timeout after starting and because the unquoted grep.
* util/pandora_server: Incresed sleep time on start.
2009-09-21 Evi Vanoost <vanooste@rcbi.rochester.edu>
* pandora_server_installer: Fixed a few bugs on non-Linux platforms

View File

@ -14,7 +14,7 @@ SECOPT=$2
get_distro () {
# Get Linux Distro type and version
# We assume we are on Linux unless told otherwise
LINUX=TRUE
LINUX=YES
if [ -f "/etc/SuSE-release" ]
then
OS_VERSION=`cat /etc/SuSE-release | grep VERSION | cut -f 3 -d " "`
@ -39,13 +39,19 @@ get_distro () {
# For future reference, Darwin doesn't have /etc/init.d but uses LaunchDaemons
LINUX_DISTRO="Darwin"
OS_VERSION=`uname -r`
LINUX=FALSE
LINUX=NO
elif [ `uname -s` == "AIX" ]
then
# For future reference, AIX doesn't have /etc/init.d
LINUX_DISTRO="AIX"
OS_VERSION=`uname -r`
LINUX=NO
elif [ `uname -s` == "SunOS" ]
then
# Some Solaris and other Unices don't have /etc/init.d, some have /usr/spool instead of /var/spool
LINUX_DISTRO="Solaris"
OS_VERSION=`uname -r`
LINUX=FALSE
LINUX=NO
elif [ `uname -s` == "Linux" ]
then
# Test for Linux to make sure we're on Linux
@ -55,9 +61,9 @@ get_distro () {
# Default to Linux is false, test for real Linux above - that way we don't assume we can just plunk down files everywhere
LINUX_DISTRO=`uname -s`
OS_VERSION=`uname -r`
LINUX=FALSE
LINUX=NO
fi
echo $LINUX_DISTRO
echo "$LINUX_DISTRO:$OS_VERSION:$LINUX"
}
@ -86,7 +92,11 @@ install () {
rm output
else
DISTRO=`get_distro`
# This returns a multiple value string, separated with ":" -> $LINUX_DISTRO:$OS_VERSION:$LINUX
GET_DISTRO="`get_distro`"
DISTRO=`echo $GET_DISTRO | cut -f 1 -d ":"`
OS_VERSION=`echo $GET_DISTRO | cut -f 2 -d ":"`
LINUX=`echo $GET_DISTRO | cut -f 3 -d ":"`
if [ "$DISTRO" == "UBUNTU" ]
then
@ -160,7 +170,7 @@ install () {
cp conf/pandora_server.conf /etc/pandora/
chmod 770 /etc/pandora/pandora_server.conf
if [ "$LINUX" == TRUE ]
if [ "$LINUX" == "YES" ]
then
echo "Copying the daemon script into /etc/init.d/pandora_server"
cp util/pandora_server /etc/init.d/
@ -183,7 +193,7 @@ install () {
echo "Please add a log rotation schedule manually to your log rotation daemon (if any)"
fi
if [ "$LINUX" == TRUE ]
if [ "$LINUX" == "YES" ]
then
if [ "$SECOPT" != "--no-tentacle" ]
then

View File

@ -57,7 +57,7 @@ case "$1" in
fi
$PANDORA_DAEMON $PANDORA_HOME -D
sleep 2
sleep 4
PANDORA_PID=`pidof_pandora`
if [ ! -z "$PANDORA_PID" ]

View File

@ -40,7 +40,7 @@ umask 0007
# if not running). Can be a list of PIDs if multiple instances are running.
function get_pid {
TENTACLE_PID=`ps aux | grep $TENTACLE_PATH$TENTACLE_DAEMON | grep -v grep | tail -1 | awk '{ print $2 }'`
TENTACLE_PID=`ps aux | grep "$TENTACLE_PATH$TENTACLE_DAEMON" | grep -v grep | tail -1 | awk '{ print $2 }'`
echo $TENTACLE_PID
}
@ -70,8 +70,7 @@ case "$1" in
fi
sudo -u $TENTACLE_USER ${TENTACLE_PATH}$TENTACLE_DAEMON $TENTACLE_OPTS
sleep 1
sleep 4
TENTACLE_PID=`get_pid`
if [ ! -z "$TENTACLE_PID" ]; then
echo "Tentacle server is now running with PID $TENTACLE_PID."