2024-02-11 22:55:49 +01:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
2026-01-06 13:28:12 +01:00
|
|
|
# Copyright (c) 2021-2026 tteck
|
2024-02-11 22:55:49 +01:00
|
|
|
# Author: tteck (tteckster)
|
2025-03-04 17:54:20 +01:00
|
|
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
|
|
|
# Source: https://couchdb.apache.org/
|
2024-02-11 22:55:49 +01:00
|
|
|
|
2025-03-24 14:20:56 +01:00
|
|
|
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
2024-02-11 22:55:49 +01:00
|
|
|
color
|
|
|
|
|
verb_ip6
|
|
|
|
|
catch_errors
|
|
|
|
|
setting_up_container
|
|
|
|
|
network_check
|
|
|
|
|
update_os
|
|
|
|
|
|
|
|
|
|
msg_info "Installing Apache CouchDB"
|
|
|
|
|
ERLANG_COOKIE=$(openssl rand -base64 32)
|
|
|
|
|
ADMIN_PASS="$(openssl rand -base64 18 | cut -c1-13)"
|
2025-03-24 14:20:56 +01:00
|
|
|
debconf-set-selections <<<"couchdb couchdb/cookie string $ERLANG_COOKIE"
|
|
|
|
|
debconf-set-selections <<<"couchdb couchdb/mode select standalone"
|
|
|
|
|
debconf-set-selections <<<"couchdb couchdb/bindaddress string 0.0.0.0"
|
|
|
|
|
debconf-set-selections <<<"couchdb couchdb/adminpass password $ADMIN_PASS"
|
|
|
|
|
debconf-set-selections <<<"couchdb couchdb/adminpass_again password $ADMIN_PASS"
|
2026-01-12 13:22:50 +01:00
|
|
|
setup_deb822_repo \
|
|
|
|
|
"couchdb" \
|
|
|
|
|
"https://couchdb.apache.org/repo/keys.asc" \
|
|
|
|
|
"https://apache.jfrog.io/artifactory/couchdb-deb" \
|
|
|
|
|
"$(get_os_info codename)" \
|
|
|
|
|
"main"
|
|
|
|
|
$STD apt install -y couchdb
|
|
|
|
|
{
|
|
|
|
|
echo "CouchDB Credentials"
|
|
|
|
|
echo "CouchDB Erlang Cookie: $ERLANG_COOKIE"
|
|
|
|
|
echo "CouchDB Admin Password: $ADMIN_PASS"
|
|
|
|
|
} >>~/couchdb.creds
|
|
|
|
|
msg_ok "Installed Apache CouchDB"
|
2024-02-11 22:55:49 +01:00
|
|
|
|
|
|
|
|
motd_ssh
|
|
|
|
|
customize
|
2025-11-22 17:27:13 +01:00
|
|
|
cleanup_lxc
|