Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
ox-installer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
QA
ox-installer
Commits
3d9809da
Commit
3d9809da
authored
5 years ago
by
benedikt.kroening
Browse files
Options
Downloads
Patches
Plain Diff
Documents feature scripts
Some cleanup to the document realted feature scripts
parent
c184437d
No related branches found
Branches containing commit
No related tags found
1 merge request
!7
Issue16 7102
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
features/documentconverter.sh
+30
-13
30 additions, 13 deletions
features/documentconverter.sh
features/documents.sh
+31
-10
31 additions, 10 deletions
features/documents.sh
with
61 additions
and
23 deletions
features/documentconverter.sh
+
30
−
13
View file @
3d9809da
#!/bin/bash
#!/bin/bash
#
#
# Copyright (C) 2019 OX Software GmbH
# Copyright (C) 2019 OX Software GmbH
...
@@ -37,13 +36,17 @@ if [[ -z "${AS_OFFICE_VERSION}" ]]; then
...
@@ -37,13 +36,17 @@ if [[ -z "${AS_OFFICE_VERSION}" ]]; then
echo
"Warning: Missing environment variable. Sourcing default versions file ..."
echo
"Warning: Missing environment variable. Sourcing default versions file ..."
exportProperties
${
SCRIPT_DIR
}
/../setup/versions
exportProperties
${
SCRIPT_DIR
}
/../setup/versions
fi
fi
if
[[
-z
"
${
INSTALL_TYPE
}
"
]]
;
then
echo
"WARNING: Missing environment variable. Sourcing default config file ..."
exportProperties
${
SCRIPT_DIR
}
/../config/config
fi
## Help text
## Help text
show_usage
()
{
show_usage
()
{
echo
-n
"
echo
-n
"
$0
[OPTIONS]
$0
[OPTIONS]
--singlenode This flag combines install, enable, server, client and the frontend flag in order to set things up on a singlenode setup
--install The install flag
--install The install flag
--enable Enable documents in config and restart the backend
--enable Enable documents in config and restart the backend
--disable Disable (WIP, may not work)
--disable Disable (WIP, may not work)
...
@@ -74,23 +77,23 @@ case $key in
...
@@ -74,23 +77,23 @@ case $key in
shift
shift
;;
;;
--enable
)
--enable
)
DOC
UMENTCONVERTER
_ENABLE
=
true
DOC
CONV
_ENABLE
=
true
shift
shift
;;
;;
--disable
)
--disable
)
DOC
UMENTS
_ENABLE
=
false
DOC
CONV
_ENABLE
=
false
shift
shift
;;
;;
--server
)
--server
)
SERVER
=
true
DOCCONV_
SERVER
=
true
shift
shift
;;
;;
--client
)
--client
)
CLIENT
=
true
DOCCONV_
CLIENT
=
true
shift
shift
;;
;;
--frontend
)
--frontend
)
FRONTEND
=
true
DOCCONV_
FRONTEND
=
true
shift
shift
;;
;;
--install
)
--install
)
...
@@ -101,6 +104,15 @@ case $key in
...
@@ -101,6 +104,15 @@ case $key in
RESTART_OX
=
true
RESTART_OX
=
true
shift
shift
;;
;;
--singlenode
)
export
DOCCONV_ENABLE
=
true
export
DOCCONV_SERVER
=
true
export
DOCCONV_CLIENT
=
true
export
DOCCONV_FRONTEND
=
true
export
INSTALL_DOCUMENTCONVERTER
=
true
RESTART_OX
=
true
shift
;;
# -k|--key)
# -k|--key)
# value="$2"
# value="$2"
# shift
# shift
...
@@ -115,7 +127,12 @@ done
...
@@ -115,7 +127,12 @@ done
set
--
"
${
POSITIONAL
[@]
}
"
# restore positional parameters
set
--
"
${
POSITIONAL
[@]
}
"
# restore positional parameters
if
[
"
$INSTALL_DOCUMENTCONVERTER
"
=
true
]
;
then
if
[
"
$INSTALL_DOCUMENTCONVERTER
"
=
true
]
;
then
if
[[
"
${
SERVER
}
"
=
true
]]
;
then
echo
"Document converter setup prepared ..."
echo
"=== (CTRL+C to cancel) ==="
sleep
3
if
[[
"
${
DOCCONV_SERVER
}
"
=
true
]]
;
then
echo
"Adding OX documentconverter server packages ..."
echo
"Adding OX documentconverter server packages ..."
PACKAGES
=
"readerengine open-xchange-documentconverter-server open-xchange-documentconverter-api "
PACKAGES
=
"readerengine open-xchange-documentconverter-server open-xchange-documentconverter-api "
installPackagesRetry
"
${
PACKAGES
}
"
installPackagesRetry
"
${
PACKAGES
}
"
...
@@ -123,7 +140,7 @@ if [ "$INSTALL_DOCUMENTCONVERTER" = true ] ; then
...
@@ -123,7 +140,7 @@ if [ "$INSTALL_DOCUMENTCONVERTER" = true ] ; then
# client will be installed by documents, frontned does not require packages
# client will be installed by documents, frontned does not require packages
fi
fi
if
[[
"
${
DOC
UMENTCONVERTER
_ENABLE
}
"
=
true
]]
;
then
if
[[
"
${
DOC
CONV
_ENABLE
}
"
=
true
]]
;
then
restartService open-xchange-documentconverter-server
restartService open-xchange-documentconverter-server
sleep
5
sleep
5
...
@@ -131,11 +148,11 @@ if [[ "${DOCUMENTCONVERTER_ENABLE}" = true ]]; then
...
@@ -131,11 +148,11 @@ if [[ "${DOCUMENTCONVERTER_ENABLE}" = true ]]; then
if
[
!
-f
${
INIT_STATE_FILE
}
]
;
then
if
[
!
-f
${
INIT_STATE_FILE
}
]
;
then
# waitPort 8008 oder so?
# waitPort 8008 oder so?
if
[[
"
${
SERVER
}
"
=
true
]]
;
then
if
[[
"
${
DOCCONV_
SERVER
}
"
=
true
]]
;
then
echo
"Doing some dc-server config"
echo
"Doing some dc-server config"
fi
fi
if
[[
"
${
CLIENT
}
"
=
true
]]
;
then
if
[[
"
${
DOCCONV_
CLIENT
}
"
=
true
]]
;
then
if
[[
-z
"
${
CONVERTER_REMOTE_URL
}
"
]]
;
then
if
[[
-z
"
${
CONVERTER_REMOTE_URL
}
"
]]
;
then
CONVERTER_REMOTE_URL
=
"http://localhost:8008/documentconverterws"
CONVERTER_REMOTE_URL
=
"http://localhost:8008/documentconverterws"
echo
"WARNING: Converter URL not provided, using fallback:
$CONVERTER_REMOTE_URL
"
echo
"WARNING: Converter URL not provided, using fallback:
$CONVERTER_REMOTE_URL
"
...
@@ -159,7 +176,7 @@ if [[ "${DOCUMENTCONVERTER_ENABLE}" = true ]]; then
...
@@ -159,7 +176,7 @@ if [[ "${DOCUMENTCONVERTER_ENABLE}" = true ]]; then
elif
[[
"
${
DOC
UMENTCONVERTER
_ENABLE
}
"
=
false
]]
;
then
elif
[[
"
${
DOC
CONV
_ENABLE
}
"
=
false
]]
;
then
echo
""
echo
""
# do something to disable it
# do something to disable it
fi
fi
...
...
This diff is collapsed.
Click to expand it.
features/documents.sh
+
31
−
10
View file @
3d9809da
...
@@ -22,7 +22,6 @@
...
@@ -22,7 +22,6 @@
# Authors:
# Authors:
# Benedikt Kroening <benedikt.kroening@open-xchange.com>
# Benedikt Kroening <benedikt.kroening@open-xchange.com>
#
#
set
-e
set
-e
SCRIPT_DIR
=
"
$(
cd
"
$(
dirname
"
$0
"
)
"
;
pwd
-P
)
"
SCRIPT_DIR
=
"
$(
cd
"
$(
dirname
"
$0
"
)
"
;
pwd
-P
)
"
# sourcing some commonly used functions and executing basic checks
# sourcing some commonly used functions and executing basic checks
...
@@ -36,7 +35,10 @@ if [[ -z "${AS_OFFICE_VERSION}" ]]; then
...
@@ -36,7 +35,10 @@ if [[ -z "${AS_OFFICE_VERSION}" ]]; then
echo
"Warning: Missing environment variable. Sourcing default versions file ..."
echo
"Warning: Missing environment variable. Sourcing default versions file ..."
exportProperties
${
SCRIPT_DIR
}
/../setup/versions
exportProperties
${
SCRIPT_DIR
}
/../setup/versions
fi
fi
if
[[
-z
"
${
INSTALL_TYPE
}
"
]]
;
then
echo
"WARNING: Missing environment variable. Sourcing default config file ..."
exportProperties
${
SCRIPT_DIR
}
/../config/config
fi
## Help text
## Help text
show_usage
()
{
show_usage
()
{
echo
-n
"
echo
-n
"
...
@@ -46,6 +48,8 @@ Please keep in mind that most of this flags are already provided by the configur
...
@@ -46,6 +48,8 @@ Please keep in mind that most of this flags are already provided by the configur
$0
[OPTIONS]
$0
[OPTIONS]
--singlenode This flag combines install, enable, middleware, frontend and the dcs flag in order to set things up on a singlenode setup
--install The install flag
--install The install flag
--enable Enable documents in config and restart the backend
--enable Enable documents in config and restart the backend
--disable Disable (WIP, may not work)
--disable Disable (WIP, may not work)
...
@@ -84,15 +88,15 @@ case $key in
...
@@ -84,15 +88,15 @@ case $key in
shift
shift
;;
;;
--middleware
)
--middleware
)
MIDDLEWARE
=
true
DOCUMENTS_
MIDDLEWARE
=
true
shift
shift
;;
;;
--frontend
)
--frontend
)
FRONTEND
=
true
DOCUMENTS_
FRONTEND
=
true
shift
shift
;;
;;
-dcs
|
--documents-collaboration
)
-dcs
|
--documents-collaboration
)
export
INSTALL_DCS
=
true
export
DOCUMENTS_
INSTALL_DCS
=
true
shift
shift
;;
;;
--guard
)
--guard
)
...
@@ -103,6 +107,18 @@ case $key in
...
@@ -103,6 +107,18 @@ case $key in
export
INSTALL_DOCUMENTS
=
true
export
INSTALL_DOCUMENTS
=
true
shift
shift
;;
;;
--singlenode
)
echo
"Configuring documents for singlenode setup (documents, dcs, document converter) ..."
export
DOCUMENTS_INSTALL_DCS
=
true
export
DOCUMENTS_FRONTEND
=
true
export
DOCUMENTS_MIDDLEWARE
=
true
export
DOCUMENTS_ENABLE
=
true
INSTALL_DOCUMENTS
=
true
INSTALL_TYPE
=
singlenode
RESTART_OX
=
true
shift
;;
# -k|--key)
# -k|--key)
# value="$2"
# value="$2"
# shift
# shift
...
@@ -122,16 +138,20 @@ set -- "${POSITIONAL[@]}" # restore positional parameters
...
@@ -122,16 +138,20 @@ set -- "${POSITIONAL[@]}" # restore positional parameters
# Install documents middleware and frontend related packages
# Install documents middleware and frontend related packages
if
[
"
$INSTALL_DOCUMENTS
"
=
true
]
;
then
if
[
"
$INSTALL_DOCUMENTS
"
=
true
]
;
then
if
[[
"
${
MIDDLEWARE
}
"
=
true
]]
;
then
if
[[
"
${
DOCUMENTS_
MIDDLEWARE
}
"
=
true
]]
;
then
echo
"Adding OX Documents middleware packages ..."
echo
"Adding OX Documents middleware packages ..."
PACKAGES
=
"
${
PACKAGES
}
open-xchange-documentconverter-client open-xchange-documents-backend open-xchange-documents-templates open-xchange-documents-ui-common open-xchange-documents-ui-editors open-xchange-documentconverter-api"
PACKAGES
=
"
${
PACKAGES
}
open-xchange-documentconverter-client open-xchange-documents-backend open-xchange-documents-templates open-xchange-documents-ui-common open-xchange-documents-ui-editors open-xchange-documentconverter-api"
fi
fi
if
[[
"
${
FRONTEND
}
"
=
true
]]
;
then
if
[[
"
${
DOCUMENTS_
FRONTEND
}
"
=
true
]]
;
then
echo
"Adding OX Documents frontend packages ..."
echo
"Adding OX Documents frontend packages ..."
PACKAGES
=
"
${
PACKAGES
}
open-xchange-documents-ui-static open-xchange-documents-help-*"
PACKAGES
=
"
${
PACKAGES
}
open-xchange-documents-ui-static open-xchange-documents-help-*"
fi
fi
echo
"Documents setup prepared"
echo
"=== (CTRL+C to cancel) ==="
sleep
3
if
[[
-n
"
${
PACKAGES
}
"
]]
;
then
if
[[
-n
"
${
PACKAGES
}
"
]]
;
then
installPackagesRetry
"
${
PACKAGES
}
"
installPackagesRetry
"
${
PACKAGES
}
"
fi
fi
...
@@ -143,7 +163,7 @@ if [ "$INSTALL_DOCUMENTS" = true ] ; then
...
@@ -143,7 +163,7 @@ if [ "$INSTALL_DOCUMENTS" = true ] ; then
fi
fi
# Install and enable Documents collaboration server, client comes below
# Install and enable Documents collaboration server, client comes below
if
[
"
$INSTALL_DCS
"
=
true
]
;
then
if
[
"
$
DOCUMENTS_
INSTALL_DCS
"
=
true
]
;
then
${
SCRIPT_DIR
}
/documents-collaboration.sh
--install
--server
${
SCRIPT_DIR
}
/documents-collaboration.sh
--install
--server
fi
fi
...
@@ -154,8 +174,9 @@ if [[ "${DOCUMENTS_ENABLE}" = true ]]; then
...
@@ -154,8 +174,9 @@ if [[ "${DOCUMENTS_ENABLE}" = true ]]; then
${
SCRIPT_DIR
}
/../config/init-documents-collaboration.sh
${
SCRIPT_DIR
}
/../config/init-documents-collaboration.sh
fi
fi
# The documents collaboration client requires some special config
# The documents collaboration client requires some special config
${
SCRIPT_DIR
}
/documents-collaboration.sh
--enable
--client
--restart
if
[
"
$DOCUMENTS_INSTALL_DCS
"
=
true
]
;
then
${
SCRIPT_DIR
}
/documents-collaboration.sh
--enable
--client
--restart
fi
setOXProperty permissions
"text,spreadsheet,presentation,presenter,document_preview"
/opt/open-xchange/etc/permissions.properties
setOXProperty permissions
"text,spreadsheet,presentation,presenter,document_preview"
/opt/open-xchange/etc/permissions.properties
if
[
"
${
INSTALL_GUARD
}
"
=
true
]
;
then
if
[
"
${
INSTALL_GUARD
}
"
=
true
]
;
then
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment