etherpad: switch default DB to sqlite + use canonical ether/etherpad repo refs
- ct/etherpad.sh + install/etherpad-install.sh: use ether/etherpad (canonical name; ether/etherpad-lite still redirects but the new name is preferred) - install/etherpad-install.sh: switch dbType from dev-only "dirty" to sqlite at /var/lib/etherpad/etherpad.db on first config seed; matches the same default we land on across the snap, .deb, and Home Assistant add-on packagings - json/etherpad.json: refresh note to reflect the sqlite default and document postgres/mysql as alternatives via dbType/dbSettings
This commit is contained in:
@@ -29,7 +29,7 @@ function update_script() {
|
||||
exit
|
||||
fi
|
||||
|
||||
if check_for_gh_release "etherpad-lite" "ether/etherpad-lite"; then
|
||||
if check_for_gh_release "etherpad-lite" "ether/etherpad"; then
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop etherpad
|
||||
msg_ok "Stopped Service"
|
||||
@@ -39,7 +39,7 @@ function update_script() {
|
||||
[ -d /opt/etherpad-lite/var ] && cp -a /opt/etherpad-lite/var /opt/etherpad-var.bak
|
||||
msg_ok "Backed up Configuration"
|
||||
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "etherpad-lite" "ether/etherpad-lite" "tarball" "latest" "/opt/etherpad-lite"
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "etherpad-lite" "ether/etherpad" "tarball" "latest" "/opt/etherpad-lite"
|
||||
|
||||
msg_info "Rebuilding Etherpad"
|
||||
cd /opt/etherpad-lite
|
||||
|
||||
@@ -31,7 +31,7 @@ msg_info "Creating etherpad User"
|
||||
useradd --system --create-home --home-dir /var/lib/etherpad --shell /usr/sbin/nologin etherpad
|
||||
msg_ok "Created etherpad User"
|
||||
|
||||
fetch_and_deploy_gh_release "etherpad-lite" "ether/etherpad-lite" "tarball" "latest" "/opt/etherpad-lite"
|
||||
fetch_and_deploy_gh_release "etherpad-lite" "ether/etherpad" "tarball" "latest" "/opt/etherpad-lite"
|
||||
|
||||
msg_info "Building Etherpad"
|
||||
cd /opt/etherpad-lite
|
||||
@@ -41,7 +41,18 @@ msg_ok "Built Etherpad"
|
||||
|
||||
msg_info "Configuring Etherpad"
|
||||
cp /opt/etherpad-lite/settings.json.template /opt/etherpad-lite/settings.json
|
||||
sed -i 's#"ip": *"127.0.0.1"#"ip": "0.0.0.0"#' /opt/etherpad-lite/settings.json
|
||||
# Switch dbType from the upstream template's dev-only "dirty" default to
|
||||
# sqlite (ACID, single-file) backed by a file in the etherpad user's
|
||||
# state directory. Matches the same default across our snap, .deb, and
|
||||
# Home Assistant add-on packagings. Admins who need postgres or mysql
|
||||
# can edit settings.json and switch dbType + dbSettings; ueberdb
|
||||
# supports both backends via the same code path.
|
||||
install -d -o etherpad -g etherpad -m 0750 /var/lib/etherpad
|
||||
sed -i \
|
||||
-e 's#"ip": *"127.0.0.1"#"ip": "0.0.0.0"#' \
|
||||
-e 's#"dbType" *: *"dirty"#"dbType": "sqlite"#' \
|
||||
-e 's#"filename" *: *"var/dirty.db"#"filename": "/var/lib/etherpad/etherpad.db"#' \
|
||||
/opt/etherpad-lite/settings.json
|
||||
chown -R etherpad:etherpad /opt/etherpad-lite
|
||||
msg_ok "Configured Etherpad"
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
},
|
||||
"notes": [
|
||||
{
|
||||
"text": "The default install uses the built-in DirtyDB store, intended for evaluation only. For production, edit /opt/etherpad-lite/settings.json and switch the 'dbType' to mysql or postgres.",
|
||||
"text": "The default install uses an embedded sqlite database at /var/lib/etherpad/etherpad.db — ACID, zero-config, suitable for single-instance homelab use. To use postgres or mysql instead, edit /opt/etherpad-lite/settings.json and switch 'dbType' + 'dbSettings' (Etherpad's ueberdb abstraction supports both).",
|
||||
"type": "info"
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user