Commit 05a1abb5 authored by benedikt.kroening's avatar benedikt.kroening
Browse files

Fixed copy&paste error in setup.bash for rhel/sles ...

parent 3814e389
......@@ -32,9 +32,6 @@ INIT_STATE_FILE="/opt/open-xchange/etc/20-init-middleware-done"
if [ ! -f ${INIT_STATE_FILE} ]; then
if [ "$CONSUL" = true ] ; then
# Read GlobalDB id and set it to globaldb.yml
# GlobalDB=$(consul kv get environment/global-db-id)
#consul kv put $OX_SERVER_NAME/env-init-done true
set +e
INIT_DONE=$(consul kv get $OX_SERVER_NAME/env-init-done)
set -e
......@@ -72,7 +69,6 @@ if [ ! -f ${INIT_STATE_FILE} ]; then
export OX_SERVER_ID=$(consul kv get $OX_SERVER_NAME/server-id)
export OX_FILESTORE_ID=$(consul kv get $OX_SERVER_NAME/filestore-id)
export OX_DATABASE_MASTER_ID=$(consul kv get $OX_SERVER_NAME/db-master-id)
export OX_DATABASE_GLOBAL_ID=$(consul kv get $OX_SERVER_NAME/db-global-id)
RE_INIT_TAG="re-"
else
......@@ -100,40 +96,22 @@ if [ ! -f ${INIT_STATE_FILE} ]; then
--name "oxdatabase" > /opt/open-xchange/etc/20-registermasterdatabase.out
export OX_DATABASE_MASTER_ID=$(cat /opt/open-xchange/etc/20-registermasterdatabase.out | awk '{ print $2 }')
echo "Registering globaldb ..."
# register globaldb
/opt/open-xchange/sbin/registerdatabase \
-A "${OX_ADMINMASTER_USER}" \
-P "${OX_ADMINMASTER_PASS}" \
--hostname "${DATABASE_HOST_NAME}" \
--dbuser "${OX_CONFIGDB_USER}" \
--dbpasswd "${OX_CONFIGDB_PASS}" \
--master "true" \
--name "oxglobal" \
--maxunit 0 > /opt/open-xchange/etc/20-registerglobaldatabase.out
export OX_DATABASE_GLOBAL_ID=$(cat /opt/open-xchange/etc/20-registerglobaldatabase.out | awk '{ print $2 }')
if [ "$CONSUL" = true ] ; then
echo "Consul is enabled, writing environment data to storage ..."
consul kv put $OX_SERVER_NAME/server-name $OX_SERVER_NAME
consul kv put $OX_SERVER_NAME/server-id $OX_SERVER_ID
consul kv put $OX_SERVER_NAME/filestore-id $OX_FILESTORE_ID
consul kv put $OX_SERVER_NAME/db-master-id $OX_DATABASE_MASTER_ID
consul kv put $OX_SERVER_NAME/db-global-id $OX_DATABASE_GLOBAL_ID
consul kv put $OX_SERVER_NAME/env-init-done true
fi
fi
echo "Setting globaldb id in /opt/open-xchange/etc/globaldb.yml to '$OX_DATABASE_GLOBAL_ID'"
sed -i "s/id:.*/id: '$OX_DATABASE_GLOBAL_ID'/g" /opt/open-xchange/etc/globaldb.yml
echo "Successfully ${RE_INIT_TAG}initialized environment..."
echo "Server name: "$OX_SERVER_NAME
echo "Server id: "$OX_SERVER_ID
echo "Filestore ID: "$OX_FILESTORE_ID
echo "Master DB ID: "$OX_DATABASE_MASTER_ID
echo "Global DB ID: "$OX_DATABASE_GLOBAL_ID
echo "===================================================="
echo "$(date)" > ${INIT_STATE_FILE}
......
......@@ -224,15 +224,6 @@ function writeFrontendRepository {
echo "deb ${AS_REPO_FRONTEND_UPDATES} /" >> /etc/apt/sources.list.d/ox-appsuite-frontend.list
fi
elif [[ true == "${ANY_RHEL}" ]] || [[ true == "${ANY_CENTOS}" ]]; then
if [[ -n "${AS_REPO_FRONTEND}" ]]; then
zypper rr ox-appsuite-frontend
zypper ar "${AS_REPO_FRONTEND}" ox-appsuite-frontend
fi
if [[ -n "${AS_REPO_FRONTEND_UPDATES}" ]]; then
zypper rr ox-appsuite-frontend-updates
zypper ar "${AS_REPO_FRONTEND_UPDATES}" ox-appsuite-frontend-updates
fi
elif [[ true == "${ANY_SLES}" ]]; then
if [[ -n "${AS_REPO_FRONTEND}" ]]; then
{
echo "[ox-appsuite-frontend]"
......@@ -252,6 +243,15 @@ function writeFrontendRepository {
echo "proxy=_none_"
} >> /etc/yum.repos.d/ox-appsuite-frontend.repo
fi
elif [[ true == "${ANY_SLES}" ]]; then
if [[ -n "${AS_REPO_FRONTEND}" ]]; then
zypper rr ox-appsuite-frontend
zypper ar "${AS_REPO_FRONTEND}" ox-appsuite-frontend
fi
if [[ -n "${AS_REPO_FRONTEND_UPDATES}" ]]; then
zypper rr ox-appsuite-frontend-updates
zypper ar "${AS_REPO_FRONTEND_UPDATES}" ox-appsuite-frontend-updates
fi
fi
}
......@@ -280,15 +280,6 @@ function writeBackendRepository {
echo "deb ${AS_REPO_BACKEND_UPDATES} /" >> /etc/apt/sources.list.d/ox-backend.list
fi
elif [[ true == "${ANY_RHEL}" ]] || [[ true == "${ANY_CENTOS}" ]]; then
if [[ -n "${AS_REPO_BACKEND}" ]]; then
zypper rr ox-appsuite-backend
zypper ar "${AS_REPO_BACKEND}" ox-backend
fi
if [[ -n "${AS_REPO_BACKEND_UPDATES}" ]]; then
zypper rr ox-appsuite-backend-updates
zypper ar "${AS_REPO_BACKEND_UPDATES}" ox-backend-updates
fi
elif [[ true == "${ANY_SLES}" ]]; then
if [[ -n "${AS_REPO_BACKEND}" ]]; then
{
echo "[ox-appsuite-backend]"
......@@ -307,6 +298,15 @@ function writeBackendRepository {
echo "proxy=_none_"
} >> /etc/yum.repos.d/ox-backend.repo
fi
elif [[ true == "${ANY_SLES}" ]]; then
if [[ -n "${AS_REPO_BACKEND}" ]]; then
zypper rr ox-appsuite-backend
zypper ar "${AS_REPO_BACKEND}" ox-backend
fi
if [[ -n "${AS_REPO_BACKEND_UPDATES}" ]]; then
zypper rr ox-appsuite-backend-updates
zypper ar "${AS_REPO_BACKEND_UPDATES}" ox-backend-updates
fi
fi
}
......
......@@ -75,11 +75,6 @@ set -- "${POSITIONAL[@]}" # restore positional parameters
writeBackendRepository
PACKAGES="open-xchange open-xchange-osgi open-xchange-xerces open-xchange-system open-xchange-core open-xchange-grizzly open-xchange-admin open-xchange-admin-soap open-xchange-authorization-standard open-xchange-authentication-database open-xchange-passwordchange-database open-xchange-l10n-en-us open-xchange-l10n-de-de open-xchange-sessionstorage-hazelcast open-xchange-websockets-grizzly open-xchange-pns-transport-websockets open-xchange-imap open-xchange-pop3 open-xchange-smtp open-xchange-mailfilter open-xchange-push-imapidle open-xchange-dav open-xchange-manage-group-resource open-xchange-subscribe open-xchange-unifiedmail open-xchange-calendar-printing open-xchange-dataretrieval open-xchange-drive open-xchange-drive-comet open-xchange-oauth open-xchange-messaging open-xchange-file-distribution open-xchange-appsuite-manifest open-xchange-appsuite-backend open-xchange-guidedtours open-xchange-appsuite-l10n-en-us open-xchange-appsuite-l10n-de-de open-xchange-rest nodejs"
if ! [ -x "$(command -v nc)" ]; then
echo "Adding nc package to list of packages ..."
PACKAGES="nc ${PACKAGES}"
fi
installPackagesRetry "${PACKAGES}"
if [[ "${INSTALL_TYPE}" == *"docker"* ]]; then
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment