%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /proc/985914/root/data/old/home/stash/stash-home/bin/
Upload File :
Create Path :
Current File : //proc/985914/root/data/old/home/stash/stash-home/bin/setenv.sh

#
# One way to set the STASH HOME path is here via this variable.  Simply uncomment it and set a valid path like
# /stash/home.  You can of course set it outside in the command terminal; that will also work.
#
STASH_HOME="/home/stash"

#
# Native libraries, such as the Tomcat native library, can be placed here for use by Stash. Alternatively, native
# libraries can also be placed in $STASH_HOME/lib/native, where they will also be included in the library path used
# by the JVM. By placing libraries in $STASH_HOME, they can be preserved across Stash upgrades.
#
# NOTE: You must choose the library architecture, x86 or x64, based on the JVM you'll be running, _not_ based on the OS.
#
JVM_LIBRARY_PATH="$CATALINA_HOME/lib/native:$STASH_HOME/lib/native"

#
# Occasionally Atlassian Support may recommend that you set some specific JVM arguments.  You can use this variable
# below to do that.
#
JVM_SUPPORT_RECOMMENDED_ARGS=""

#
# The following 2 settings control the minimum and maximum given to the Atlassian Stash Java virtual machine.
# In larger Stash instances, the maximum amount will need to be increased.
#
JVM_MINIMUM_MEMORY="512m"
JVM_MAXIMUM_MEMORY="768m"

#
# File encoding passed into the Atlassian Stash Java virtual machine
#
JVM_FILE_ENCODING="UTF-8"

#
# The following are the required arguments needed for Atlassian Stash.
#
JVM_REQUIRED_ARGS="-Djava.awt.headless=true -Dfile.encoding=${JVM_FILE_ENCODING} -Datlassian.standalone=STASH -Dorg.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER=true -Dmail.mime.decodeparameters=true -Dorg.apache.catalina.connector.Response.ENFORCE_ENCODING_IN_GET_WRITER=false"

#
# Uncommenting the following will set the umask for the Atlassian Stash application. If can be used to override
# the default settings of the Stash user is they are not sufficiently secure.
#
# umask 0027

#-----------------------------------------------------------------------------------
#
# In general don't make changes below here
#
#-----------------------------------------------------------------------------------

PRGDIR=`dirname "$0"`

if [ -z "$STASH_HOME" ]; then
    echo ""
    echo "-------------------------------------------------------------------------------"
    echo "  Stash doesn't know where to store its data. Please configure the STASH_HOME"
    echo "  environment variable with the directory where Stash should store its data."
    echo "  Ensure that the path to STASH_HOME does not contain spaces. STASH_HOME may"
    echo "  be configured in setenv.sh, if preferred, rather than exporting it as an"
    echo "  environment variable."
    echo "-------------------------------------------------------------------------------"
    exit 1
fi

echo $STASH_HOME | grep -q " "
if [ $? -eq 0 ]; then
    echo ""
    echo "-------------------------------------------------------------------------------"
    echo "  STASH_HOME \"$STASH_HOME\" contains spaces."
    echo "  Using a directory with spaces is likely to cause unexpected behaviour and is"
    echo "  not supported. Please use a directory which does not contain spaces."
    echo "-------------------------------------------------------------------------------"
    exit 1
fi

UMASK=`umask`
UMASK_SYMBOLIC=`umask -S`
if [[ $UMASK != *0[2367]7 ]]; then
    FORCE_EXIT=false
    echo ""
    echo "-------------------------------------------------------------------------------"
    echo "Stash is being run with a umask that contains potentially unsafe settings."
    echo "The following issues were found with the mask \"$UMASK_SYMBOLIC\" ($UMASK):"
    if [[ $UMASK != *7 ]]; then
        echo " - access is allowed to 'others'. It is recommended that 'others' be denied"
        echo "   all access for security reasons."
    fi
    if [[ $UMASK != *[2367][0-9] ]]; then
        echo " - write access is allowed to 'group'. It is recommend that 'group' be"
        echo "   denied write access. Read access to a restricted group is recommended"
        echo "   to allow access to the logs."
    fi
    if [[ $UMASK != *0[0-9][0-9] ]]; then
        echo " - full access has been denied to 'user'. Stash cannot be run without full"
        echo "   access being allowed."
        FORCE_EXIT=true
    fi
    echo ""
    echo "The recommended umask for Stash is \"u=,g=w,o=rwx\" (0027) and can be"
    echo "configured in setenv.sh"
    echo "-------------------------------------------------------------------------------"
    if [[ $FORCE_EXIT == true ]]; then
        exit 1;
    fi
fi

STASH_HOME_MINUSD=-Dstash.home=$STASH_HOME

if [ "$JVM_LIBRARY_PATH" != "" ]; then
    JVM_LIBRARY_PATH_MINUSD=-Djava.library.path=$JVM_LIBRARY_PATH
    JVM_REQUIRED_ARGS="${JVM_REQUIRED_ARGS} ${JVM_LIBRARY_PATH_MINUSD}"
fi

JAVA_OPTS="-Xms${JVM_MINIMUM_MEMORY} -Xmx${JVM_MAXIMUM_MEMORY} ${JAVA_OPTS} ${JVM_REQUIRED_ARGS} ${JVM_SUPPORT_RECOMMENDED_ARGS} ${STASH_HOME_MINUSD}"

# PermGen size needs to be increased if encountering OutOfMemoryError: PermGen problems. Specifying PermGen size is
# not valid on IBM JDKs
STASH_MAX_PERM_SIZE=256m
if [ -f "${PRGDIR}/permgen.sh" ]; then
    echo "Detecting JVM PermGen support..."
    . "${PRGDIR}/permgen.sh"
    if [ $JAVA_PERMGEN_SUPPORTED = "true" ]; then
        echo "PermGen switch is supported. Setting to ${STASH_MAX_PERM_SIZE}\n"
        JAVA_OPTS="-XX:MaxPermSize=${STASH_MAX_PERM_SIZE} ${JAVA_OPTS}"
    else
        echo "PermGen switch is NOT supported and will NOT be set automatically.\n"
    fi
fi

export JAVA_OPTS

if [ "$STASH_HOME_MINUSD" != "" ]; then
    echo "Using STASH_HOME:      $STASH_HOME"
fi

# set the location of the pid file
if [ -z "$CATALINA_PID" ] ; then
    if [ -n "$CATALINA_BASE" ] ; then
        CATALINA_PID="$CATALINA_BASE"/work/catalina.pid
    elif [ -n "$CATALINA_HOME" ] ; then
        CATALINA_PID="$CATALINA_HOME"/work/catalina.pid
    fi
fi
export CATALINA_PID

Zerion Mini Shell 1.0