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 5ccd4995de
commit d9dfbd1a29
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> 2009-09-21 Evi Vanoost <vanooste@rcbi.rochester.edu>
* pandora_server_installer: Fixed a few bugs on non-Linux platforms * pandora_server_installer: Fixed a few bugs on non-Linux platforms

View File

@ -14,7 +14,7 @@ SECOPT=$2
get_distro () { get_distro () {
# Get Linux Distro type and version # Get Linux Distro type and version
# We assume we are on Linux unless told otherwise # We assume we are on Linux unless told otherwise
LINUX=TRUE LINUX=YES
if [ -f "/etc/SuSE-release" ] if [ -f "/etc/SuSE-release" ]
then then
OS_VERSION=`cat /etc/SuSE-release | grep VERSION | cut -f 3 -d " "` 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 # For future reference, Darwin doesn't have /etc/init.d but uses LaunchDaemons
LINUX_DISTRO="Darwin" LINUX_DISTRO="Darwin"
OS_VERSION=`uname -r` 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" ] elif [ `uname -s` == "SunOS" ]
then then
# Some Solaris and other Unices don't have /etc/init.d, some have /usr/spool instead of /var/spool # Some Solaris and other Unices don't have /etc/init.d, some have /usr/spool instead of /var/spool
LINUX_DISTRO="Solaris" LINUX_DISTRO="Solaris"
OS_VERSION=`uname -r` OS_VERSION=`uname -r`
LINUX=FALSE LINUX=NO
elif [ `uname -s` == "Linux" ] elif [ `uname -s` == "Linux" ]
then then
# Test for Linux to make sure we're on Linux # 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 # 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` LINUX_DISTRO=`uname -s`
OS_VERSION=`uname -r` OS_VERSION=`uname -r`
LINUX=FALSE LINUX=NO
fi fi
echo $LINUX_DISTRO echo "$LINUX_DISTRO:$OS_VERSION:$LINUX"
} }
@ -85,9 +91,13 @@ install () {
echo " " echo " "
rm output rm output
else else
# 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 ":"`
DISTRO=`get_distro`
if [ "$DISTRO" == "UBUNTU" ] if [ "$DISTRO" == "UBUNTU" ]
then then
echo "UBUNTU distribution detected" echo "UBUNTU distribution detected"
@ -160,7 +170,7 @@ install () {
cp conf/pandora_server.conf /etc/pandora/ cp conf/pandora_server.conf /etc/pandora/
chmod 770 /etc/pandora/pandora_server.conf chmod 770 /etc/pandora/pandora_server.conf
if [ "$LINUX" == TRUE ] if [ "$LINUX" == "YES" ]
then then
echo "Copying the daemon script into /etc/init.d/pandora_server" echo "Copying the daemon script into /etc/init.d/pandora_server"
cp util/pandora_server /etc/init.d/ cp util/pandora_server /etc/init.d/
@ -182,8 +192,8 @@ install () {
else else
echo "Please add a log rotation schedule manually to your log rotation daemon (if any)" echo "Please add a log rotation schedule manually to your log rotation daemon (if any)"
fi fi
if [ "$LINUX" == TRUE ] if [ "$LINUX" == "YES" ]
then then
if [ "$SECOPT" != "--no-tentacle" ] if [ "$SECOPT" != "--no-tentacle" ]
then then
@ -227,7 +237,7 @@ uninstall () {
echo "This is not a Linux-based distro. Uninstaller is currently not working for your OS" echo "This is not a Linux-based distro. Uninstaller is currently not working for your OS"
fi fi
echo "Removing Pandora Servers" echo "Removing Pandora Servers"
rm -Rf /var/spool/pandora/data_in/ rm -Rf /var/spool/pandora/data_in/
echo "If the user Pandora is not being used for any other operations, please delete using the following commands:" echo "If the user Pandora is not being used for any other operations, please delete using the following commands:"
echo " userdel pandora" echo " userdel pandora"

View File

@ -57,7 +57,7 @@ case "$1" in
fi fi
$PANDORA_DAEMON $PANDORA_HOME -D $PANDORA_DAEMON $PANDORA_HOME -D
sleep 2 sleep 4
PANDORA_PID=`pidof_pandora` PANDORA_PID=`pidof_pandora`
if [ ! -z "$PANDORA_PID" ] 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. # if not running). Can be a list of PIDs if multiple instances are running.
function get_pid { 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 echo $TENTACLE_PID
} }
@ -70,8 +70,7 @@ case "$1" in
fi fi
sudo -u $TENTACLE_USER ${TENTACLE_PATH}$TENTACLE_DAEMON $TENTACLE_OPTS sudo -u $TENTACLE_USER ${TENTACLE_PATH}$TENTACLE_DAEMON $TENTACLE_OPTS
sleep 1 sleep 4
TENTACLE_PID=`get_pid` TENTACLE_PID=`get_pid`
if [ ! -z "$TENTACLE_PID" ]; then if [ ! -z "$TENTACLE_PID" ]; then
echo "Tentacle server is now running with PID $TENTACLE_PID." echo "Tentacle server is now running with PID $TENTACLE_PID."