add Etherpad script

This commit is contained in:
tremor021
2026-05-14 14:30:38 +02:00
parent c368c67b2c
commit 649871cd59
3 changed files with 130 additions and 0 deletions

63
ct/etherpad.sh Normal file
View File

@@ -0,0 +1,63 @@
#!/usr/bin/env bash
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func)
# Copyright (c) 2021-2026 community-scripts ORG
# Author: Slaviša Arežina (tremor021)
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
# Source: https://github.com/ether/etherpad
APP="Etherpad"
var_tags="${var_tags:-}"
var_cpu="${var_cpu:-2}"
var_ram="${var_ram:-2048}"
var_disk="${var_disk:-8}"
var_os="${var_os:-debian}"
var_version="${var_version:-13}"
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 /opt/etherpad ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
if check_for_gh_release "etherpad" "ether/etherpad"; then
msg_info "Stopping Service"
systemctl stop etherpad
msg_ok "Stopped Service"
msg_info "Backing up configuration"
cp /opt/etherpad/settings.json /opt/
msg_ok "Backed up configuration"
fetch_and_deploy_gh_release "etherpad" "ether/etherpad" "binary"
msg_info "Restoring configuration"
mv /opt/settings.json /opt/etherpad/
msg_ok "Restored configuration"
msg_info "Starting Service"
systemctl start etherpad
msg_ok "Started Service"
msg_ok "Updated successfully!"
fi
cleanup_lxc
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}:9001${CL}"

View File

@@ -0,0 +1,27 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2026 community-scripts ORG
# Author: Slaviša Arežina (tremor021)
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
# Source: https://github.com/ether/etherpad
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
setting_up_container
network_check
update_os
NODE_VERSION=25 setup_nodejs
fetch_and_deploy_gh_release "etherpad" "ether/etherpad" "binary"
msg_info "Configuring Etherpad"
sed -i 's|"soffice": null|"soffice": "/usr/bin/libreoffice"|' /opt/etherpad/settings.json
msg_ok "Configured Etherpad"
systemctl start etherpad
motd_ssh
customize
cleanup_lxc

40
json/etherpad.json Normal file
View File

@@ -0,0 +1,40 @@
{
"name": "Etherpad",
"slug": "etherpad",
"categories": [
12
],
"date_created": "2026-05-14",
"type": "ct",
"updateable": true,
"privileged": false,
"interface_port": 9001,
"documentation": "https://docs.etherpad.org/",
"website": "https://etherpad.org/",
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/etherpad.webp",
"description": "Etherpad is a real-time collaborative editor for documents that matter. Every keystroke is attributed to its author. Every revision is preserved. The timeslider lets you scrub through a document's entire history, character by character. Author colours make collaboration visible at a glance — not buried in a menu.",
"install_methods": [
{
"type": "default",
"script": "ct/etherpad.sh",
"config_path": "/opt/etherpad/settings.json",
"resources": {
"cpu": 2,
"ram": 2048,
"hdd": 8,
"os": "Debian",
"version": "13"
}
}
],
"default_credentials": {
"username": null,
"password": null
},
"notes": [
{
"text": "Admin account is set by editing /opt/etherpad/settings.json and restarting the service.",
"type": "info"
}
]
}