OpenCloud: Collabora
This commit is contained in:
parent
2f647fa3c8
commit
44b3705336
@ -28,6 +28,7 @@ EOF
|
|||||||
|
|
||||||
$STD apt-get update
|
$STD apt-get update
|
||||||
$STD apt-get install -y coolwsd code-brand
|
$STD apt-get install -y coolwsd code-brand
|
||||||
|
systemctl stop coolwsd
|
||||||
|
|
||||||
msg_info "Installing ${APPLICATION}"
|
msg_info "Installing ${APPLICATION}"
|
||||||
OPENCLOUD=$(curl -s https://api.github.com/repos/opencloud-eu/opencloud/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
OPENCLOUD=$(curl -s https://api.github.com/repos/opencloud-eu/opencloud/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||||
@ -45,16 +46,31 @@ msg_info "Configuring ${APPLICATION}"
|
|||||||
cat <<EOF >"$ENV_FILE"
|
cat <<EOF >"$ENV_FILE"
|
||||||
OC_URL=https://${IP}:9200
|
OC_URL=https://${IP}:9200
|
||||||
OC_INSECURE=true
|
OC_INSECURE=true
|
||||||
PROXY_ENABLE_BASIC_AUTH=true
|
|
||||||
IDM_CREATE_DEMO_USERS=false
|
IDM_CREATE_DEMO_USERS=false
|
||||||
OC_LOG_LEVEL=warning
|
OC_LOG_LEVEL=warning
|
||||||
OC_CONFIG_DIR=${CONFIG_DIR}
|
OC_CONFIG_DIR=${CONFIG_DIR}
|
||||||
OC_BASE_DATA_PATH=${DATA_DIR}
|
OC_BASE_DATA_PATH=${DATA_DIR}
|
||||||
|
|
||||||
|
# Proxy
|
||||||
|
PROXY_ENABLE_BASIC_AUTH=true
|
||||||
|
PROXY_CSP_CONFIG_FILE_LOCATION=${CONFIG_DIR}/csp.yaml
|
||||||
|
|
||||||
|
# Collaboration - requires VALID TLS
|
||||||
|
COLLABORA_DOMAIN=
|
||||||
|
COLLABORATION_APP_NAME="CollaboraOnline"
|
||||||
|
COLLABORATION_APP_PRODUCT="Collabora"
|
||||||
|
COLLABORATION_APP_ADDR=
|
||||||
|
COLLABORATION_APP_INSECURE=false
|
||||||
|
COLLABORATION_HTTP_ADDR=0.0.0.0:9300
|
||||||
|
COLLABORATION_WOPI_SRC=https://${IP}:9300
|
||||||
|
COLLABORATION_JWT_SECRET=
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
cat <<EOF >/etc/systemd/system/opencloud.service
|
cat <<EOF >/etc/systemd/system/opencloud.service
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=OpenCloud server
|
Description=OpenCloud server
|
||||||
|
After=network.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
@ -68,10 +84,30 @@ Restart=always
|
|||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
cat <<EOF >/etc/systemd/system/opencloud-wopi.service
|
||||||
|
[Unit]
|
||||||
|
Description=OpenCloud WOPI Server
|
||||||
|
After=network.target opencloud.service coolwsd.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
User=opencloud
|
||||||
|
Group=opencloud
|
||||||
|
EnvironmentFile=${ENV_FILE}
|
||||||
|
ExecStart=/usr/bin/opencloud collaboration server
|
||||||
|
Restart=on-abnormal
|
||||||
|
KillSignal=SIGKILL
|
||||||
|
KillMode=mixed
|
||||||
|
TimeoutStopSec=120
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
EOF
|
||||||
useradd -r -M -s /usr/sbin/nologin opencloud
|
useradd -r -M -s /usr/sbin/nologin opencloud
|
||||||
chown -R opencloud:opencloud "$CONFIG_DIR" "$DATA_DIR"
|
chown -R opencloud:opencloud "$CONFIG_DIR" "$DATA_DIR"
|
||||||
sudo -u opencloud opencloud init --config-path "$CONFIG_DIR" --insecure yes
|
sudo -u opencloud opencloud init --config-path "$CONFIG_DIR" --insecure yes
|
||||||
systemctl enable -q --now opencloud.service
|
systemctl enable -q --now coolwsd opencloud
|
||||||
|
sleep 2 && systemctl enable -q --now opencloud-wopi
|
||||||
msg_ok "Configured ${APPLICATION}"
|
msg_ok "Configured ${APPLICATION}"
|
||||||
|
|
||||||
motd_ssh
|
motd_ssh
|
||||||
|
Loading…
x
Reference in New Issue
Block a user