Merge pull request #622 from community-scripts/delete_files
Delete Files for OnlyOffice after Merge to Main
This commit is contained in:
commit
d8858a9baa
@ -1,52 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
source <(curl -s https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/build.func)
|
|
||||||
# Copyright (c) 2021-2025 community-scripts ORG
|
|
||||||
# Author: MickLesk (CanbiZ)
|
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
|
|
||||||
# Source: https://www.onlyoffice.com/
|
|
||||||
|
|
||||||
APP="OnlyOffice"
|
|
||||||
var_tags="${var_tags:-word;excel;powerpoint;pdf}"
|
|
||||||
var_cpu="${var_cpu:-2}"
|
|
||||||
var_ram="${var_ram:-2048}"
|
|
||||||
var_disk="${var_disk:-10}"
|
|
||||||
var_os="${var_os:-debian}"
|
|
||||||
var_version="${var_version:-12}"
|
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
|
||||||
|
|
||||||
header_info "$APP"
|
|
||||||
variables
|
|
||||||
color
|
|
||||||
catch_errors
|
|
||||||
|
|
||||||
function update_script() {
|
|
||||||
header_info
|
|
||||||
check_container_storage
|
|
||||||
check_container_resources
|
|
||||||
|
|
||||||
if [[ ! -d /var/www/onlyoffice ]]; then
|
|
||||||
msg_error "No valid ${APP} installation found!"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
msg_info "Updating $APP"
|
|
||||||
$STD apt-get update
|
|
||||||
$STD apt-get -y --only-upgrade install onlyoffice-documentserver
|
|
||||||
msg_ok "Updated $APP"
|
|
||||||
|
|
||||||
if systemctl is-enabled --quiet onlyoffice-documentserver; then
|
|
||||||
msg_info "Restarting $APP"
|
|
||||||
$STD systemctl restart onlyoffice-documentserver
|
|
||||||
msg_ok "$APP restarted"
|
|
||||||
fi
|
|
||||||
exit
|
|
||||||
}
|
|
||||||
|
|
||||||
start
|
|
||||||
build_container
|
|
||||||
description
|
|
||||||
|
|
||||||
msg_ok "Completed Successfully!\n"
|
|
||||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
|
||||||
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
|
|
||||||
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}${CL}"
|
|
@ -1,35 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "ONLYOFFICE Docs",
|
|
||||||
"slug": "onlyoffice",
|
|
||||||
"categories": [
|
|
||||||
9
|
|
||||||
],
|
|
||||||
"date_created": "2025-06-17",
|
|
||||||
"type": "ct",
|
|
||||||
"updateable": true,
|
|
||||||
"privileged": false,
|
|
||||||
"interface_port": 80,
|
|
||||||
"documentation": "https://helpcenter.onlyoffice.com/docs",
|
|
||||||
"website": "https://onlyoffice.com/",
|
|
||||||
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/onlyoffice.webp",
|
|
||||||
"config_path": "/etc/onlyoffice/documentserver/local.json",
|
|
||||||
"description": "ONLYOFFICE Docs is an open-source online office suite that provides collaborative editors for text documents, spreadsheets, and presentations, fully compatible with Microsoft Office formats (DOCX, XLSX, PPTX).",
|
|
||||||
"install_methods": [
|
|
||||||
{
|
|
||||||
"type": "default",
|
|
||||||
"script": "ct/onlyoffice.sh",
|
|
||||||
"resources": {
|
|
||||||
"cpu": 2,
|
|
||||||
"ram": 2048,
|
|
||||||
"hdd": 10,
|
|
||||||
"os": "Debian",
|
|
||||||
"version": "12"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"default_credentials": {
|
|
||||||
"username": "admin",
|
|
||||||
"password": "admin"
|
|
||||||
},
|
|
||||||
"notes": []
|
|
||||||
}
|
|
@ -1,104 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# Copyright (c) 2021-2025 community-scripts ORG
|
|
||||||
# Author: MickLesk (CanbiZ)
|
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
|
|
||||||
|
|
||||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
|
||||||
color
|
|
||||||
verb_ip6
|
|
||||||
catch_errors
|
|
||||||
setting_up_container
|
|
||||||
network_check
|
|
||||||
update_os
|
|
||||||
|
|
||||||
msg_info "Installing Dependencies"
|
|
||||||
$STD apt-get install -y \
|
|
||||||
nginx \
|
|
||||||
rabbitmq-server \
|
|
||||||
ca-certificates \
|
|
||||||
software-properties-common
|
|
||||||
msg_ok "Installed Dependencies"
|
|
||||||
|
|
||||||
PG_VERSION="16" setup_postgresql
|
|
||||||
|
|
||||||
msg_info "Setup Database"
|
|
||||||
DB_NAME=onlyoffice
|
|
||||||
DB_USER=onlyoffice_user
|
|
||||||
DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13)
|
|
||||||
$STD sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';"
|
|
||||||
$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER ENCODING 'UTF8' TEMPLATE template0;"
|
|
||||||
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET client_encoding TO 'utf8';"
|
|
||||||
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET default_transaction_isolation TO 'read committed';"
|
|
||||||
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC'"
|
|
||||||
{
|
|
||||||
echo "OnlyOffice-Credentials"
|
|
||||||
echo "OnlyOffice Database User: $DB_USER"
|
|
||||||
echo "OnlyOffice Database Password: $DB_PASS"
|
|
||||||
echo "OnlyOffice Database Name: $DB_NAME"
|
|
||||||
} >>~/onlyoffice.creds
|
|
||||||
msg_ok "Set up Database"
|
|
||||||
|
|
||||||
msg_info "Adding ONLYOFFICE GPG Key"
|
|
||||||
GPG_TMP="/tmp/onlyoffice.gpg"
|
|
||||||
KEY_URL="https://download.onlyoffice.com/GPG-KEY-ONLYOFFICE"
|
|
||||||
|
|
||||||
TMP_KEY_CONTENT=$(mktemp)
|
|
||||||
if curl -fsSL "$KEY_URL" -o "$TMP_KEY_CONTENT" && grep -q "BEGIN PGP PUBLIC KEY BLOCK" "$TMP_KEY_CONTENT"; then
|
|
||||||
gpg --quiet --batch --yes --no-default-keyring --keyring "gnupg-ring:$GPG_TMP" --import "$TMP_KEY_CONTENT" >/dev/null 2>&1
|
|
||||||
chmod 644 "$GPG_TMP"
|
|
||||||
chown root:root "$GPG_TMP"
|
|
||||||
mv "$GPG_TMP" /usr/share/keyrings/onlyoffice.gpg
|
|
||||||
echo "deb [signed-by=/usr/share/keyrings/onlyoffice.gpg] https://download.onlyoffice.com/repo/debian squeeze main" >/etc/apt/sources.list.d/onlyoffice.list
|
|
||||||
$STD apt-get update
|
|
||||||
msg_ok "GPG Key Added"
|
|
||||||
else
|
|
||||||
msg_error "Failed to download or verify GPG key from $KEY_URL"
|
|
||||||
[[ -f "$TMP_KEY_CONTENT" ]] && rm -f "$TMP_KEY_CONTENT"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
rm -f "$TMP_KEY_CONTENT"
|
|
||||||
|
|
||||||
msg_info "Preconfiguring ONLYOFFICE Debconf Settings"
|
|
||||||
RMQ_USER=onlyoffice_rmq
|
|
||||||
RMQ_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13)
|
|
||||||
JWT_SECRET=$(openssl rand -hex 16)
|
|
||||||
|
|
||||||
echo onlyoffice-documentserver onlyoffice/db-host string localhost | debconf-set-selections
|
|
||||||
echo onlyoffice-documentserver onlyoffice/db-user string $DB_USER | debconf-set-selections
|
|
||||||
echo onlyoffice-documentserver onlyoffice/db-pwd password $DB_PASS | debconf-set-selections
|
|
||||||
echo onlyoffice-documentserver onlyoffice/db-name string $DB_NAME | debconf-set-selections
|
|
||||||
echo onlyoffice-documentserver onlyoffice/rabbitmq-host string localhost | debconf-set-selections
|
|
||||||
echo onlyoffice-documentserver onlyoffice/rabbitmq-user string $RMQ_USER | debconf-set-selections
|
|
||||||
echo onlyoffice-documentserver onlyoffice/rabbitmq-pwd password $RMQ_PASS | debconf-set-selections
|
|
||||||
echo onlyoffice-documentserver onlyoffice/jwt-enabled boolean true | debconf-set-selections
|
|
||||||
echo onlyoffice-documentserver onlyoffice/jwt-secret password $JWT_SECRET | debconf-set-selections
|
|
||||||
|
|
||||||
echo "RabbitMQ User: $RMQ_USER" >>~/onlyoffice.creds
|
|
||||||
echo "RabbitMQ Password: $RMQ_PASS" >>~/onlyoffice.creds
|
|
||||||
echo "JWT Secret: $JWT_SECRET" >>~/onlyoffice.creds
|
|
||||||
{
|
|
||||||
echo ""
|
|
||||||
echo "OnlyOffice RabbitMQ Credentials"
|
|
||||||
echo "User: $RMQ_USER"
|
|
||||||
echo "Password: $RMQ_PASS"
|
|
||||||
echo "Secret: $JWT_SECRET"
|
|
||||||
} >>~/booklore.creds
|
|
||||||
msg_ok "Debconf Preconfiguration Done"
|
|
||||||
|
|
||||||
msg_info "Installing ttf-mscorefonts-installer"
|
|
||||||
echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | debconf-set-selections
|
|
||||||
$STD apt-get install -y ttf-mscorefonts-installer
|
|
||||||
msg_ok "Installed Microsoft Core Fonts"
|
|
||||||
|
|
||||||
msg_info "Installing ONLYOFFICE Docs"
|
|
||||||
$STD apt-get install -y onlyoffice-documentserver
|
|
||||||
msg_ok "ONLYOFFICE Docs Installed"
|
|
||||||
|
|
||||||
motd_ssh
|
|
||||||
customize
|
|
||||||
|
|
||||||
msg_info "Cleaning up"
|
|
||||||
$STD apt-get -y autoremove
|
|
||||||
$STD apt-get -y autoclean
|
|
||||||
msg_ok "Cleaned"
|
|
Loading…
x
Reference in New Issue
Block a user