Compare commits

..

2 Commits

Author SHA1 Message Date
CanbiZ (MickLesk) a2112fcefb Update source command in hister.sh
Replace local source with direct curl command for build.func.
2026-08-04 16:53:37 +02:00
push-app-to-main[bot] e227007426 Add hister (ct) 2026-08-04 14:51:30 +00:00
12 changed files with 134 additions and 204 deletions
-14
View File
@@ -520,26 +520,12 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
## 2026-08-04
### 🆕 New Scripts
- Obsidian-LiveSync ([#16233](https://github.com/community-scripts/ProxmoxVE/pull/16233))
### 🚀 Updated Scripts
- Opencloud: Pin version to 7.4.0 [@vhsdream](https://github.com/vhsdream) ([#16257](https://github.com/community-scripts/ProxmoxVE/pull/16257))
- #### 🐞 Bug Fixes
- AFFiNE: fix version and build type reported by the app itself [@MickLesk](https://github.com/MickLesk) ([#16251](https://github.com/community-scripts/ProxmoxVE/pull/16251))
- Passbolt: fetch GPG key from Passbolt's own host instead of the flaky keyserver [@MickLesk](https://github.com/MickLesk) ([#16248](https://github.com/community-scripts/ProxmoxVE/pull/16248))
### 💾 Core
- #### 🐞 Bug Fixes
- tools.func: never delete ubuntu.sources (or other distro base sources) as orphaned [@MickLesk](https://github.com/MickLesk) ([#16250](https://github.com/community-scripts/ProxmoxVE/pull/16250))
- tools.func: complete a stale/partial backup manifest instead of trusting it as-is [@MickLesk](https://github.com/MickLesk) ([#16252](https://github.com/community-scripts/ProxmoxVE/pull/16252))
## 2026-08-03
### 🚀 Updated Scripts
-2
View File
@@ -81,8 +81,6 @@ TURBO
export NODE_OPTIONS="--max-old-space-size=2048"
$STD yarn install
$STD bash ./scripts/set-version.sh "$(cat ~/.affine_app)"
export BUILD_TYPE=stable
$STD npm install -g typescript
$STD yarn affine @affine/native build
+6
View File
@@ -0,0 +1,6 @@
__ ___ __
/ / / (_)____/ /____ _____
/ /_/ / / ___/ __/ _ \/ ___/
/ __ / (__ ) /_/ __/ /
/_/ /_/_/____/\__/\___/_/
-6
View File
@@ -1,6 +0,0 @@
____ __ _ ___ __ _ _____
/ __ \/ /_ _____(_)___/ (_)___ _____ / / (_) _____ / ___/__ ______ _____
/ / / / __ \/ ___/ / __ / / __ `/ __ \______/ / / / | / / _ \\__ \/ / / / __ \/ ___/
/ /_/ / /_/ (__ ) / /_/ / / /_/ / / / /_____/ /___/ /| |/ / __/__/ / /_/ / / / / /__
\____/_.___/____/_/\__,_/_/\__,_/_/ /_/ /_____/_/ |___/\___/____/\__, /_/ /_/\___/
/____/
+56
View File
@@ -0,0 +1,56 @@
#!/usr/bin/env bash
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
# Copyright (c) 2021-2026 community-scripts ORG
# Author: MickLesk (CanbiZ)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://github.com/asciimoo/hister
APP="Hister"
var_tags="${var_tags:-search;browser-history;personal}"
var_cpu="${var_cpu:-1}"
var_ram="${var_ram:-1024}"
var_disk="${var_disk:-20}"
var_os="${var_os:-debian}"
var_version="${var_version:-13}"
var_arm64="${var_arm64:-yes}"
var_unprivileged="${var_unprivileged:-1}"
header_info "$APP"
variables
color
catch_errors
function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -f /usr/local/bin/hister ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
if check_for_gh_release "hister" "asciimoo/hister"; then
msg_info "Stopping Service"
systemctl stop hister
msg_ok "Stopped Service"
ARCH=$(dpkg --print-architecture)
fetch_and_deploy_gh_release "hister" "asciimoo/hister" "singlefile" "latest" "/usr/local/bin" "hister_*_linux_${ARCH}"
msg_info "Starting Service"
systemctl start hister
msg_ok "Started Service"
msg_ok "Updated successfully!"
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 "${GATEWAY}${BGN}http://${IP}:4433${CL}"
-61
View File
@@ -1,61 +0,0 @@
#!/usr/bin/env bash
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
# Copyright (c) 2021-2026 community-scripts ORG
# Author: MickLesk (CanbiZ)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://github.com/vrtmrz/obsidian-livesync | https://couchdb.apache.org/
APP="Obsidian-LiveSync"
var_tags="${var_tags:-documents;notes}"
var_cpu="${var_cpu:-1}"
var_ram="${var_ram:-1024}"
var_disk="${var_disk:-8}"
var_os="${var_os:-debian}"
var_version="${var_version:-13}"
var_arm64="${var_arm64:-yes}"
var_unprivileged="${var_unprivileged:-1}"
header_info "$APP"
variables
color
catch_errors
function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -f /opt/couchdb/etc/local.d/obsidian-livesync.ini ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
msg_info "Stopping CouchDB"
systemctl stop couchdb
msg_ok "Stopped CouchDB"
create_backup /var/lib/couchdb /opt/couchdb/etc/local.d/obsidian-livesync.ini /opt/obsidian-livesync/.env
msg_info "Updating Container OS"
$STD apt update
$STD apt upgrade -y
msg_ok "Updated Container OS"
systemctl stop couchdb
restore_backup
msg_info "Starting CouchDB"
systemctl start couchdb
msg_ok "Started CouchDB"
msg_ok "Updated successfully!"
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}Configure the Self-hosted LiveSync plugin with the credentials in /opt/obsidian-livesync/.env${CL}"
echo -e "${GATEWAY}${BGN}http://${IP}:5984/_utils/${CL}"
+1 -1
View File
@@ -30,7 +30,7 @@ function update_script() {
exit
fi
RELEASE="v7.4.0"
RELEASE="v7.3.0"
if check_for_gh_release "OpenCloud" "opencloud-eu/opencloud" "${RELEASE}" "each release is tested individually before the version is updated. Please do not open issues for this"; then
msg_info "Stopping services"
systemctl stop opencloud opencloud-wopi
-2
View File
@@ -78,8 +78,6 @@ $STD yarn config set enableTelemetry 0
export NODE_OPTIONS="--max-old-space-size=4096"
export TSC_COMPILE_ON_ERROR=true
$STD yarn install
$STD bash ./scripts/set-version.sh "$(cat ~/.affine_app)"
export BUILD_TYPE=stable
$STD npm install -g typescript
$STD yarn affine @affine/native build
$STD yarn affine @affine/server-native build
+52
View File
@@ -0,0 +1,52 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2026 community-scripts ORG
# Author: MickLesk (CanbiZ)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://github.com/asciimoo/hister
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
setting_up_container
network_check
update_os
ARCH=$(dpkg --print-architecture)
fetch_and_deploy_gh_release "hister" "asciimoo/hister" "singlefile" "latest" "/usr/local/bin" "hister_*_linux_${ARCH}"
msg_info "Configuring Hister"
mkdir -p /opt/hister/data /etc/hister
LOCAL_IP=$(hostname -I | awk '{print $1}')
cat <<EOF >/etc/hister/config.yaml
app:
directory: '/opt/hister/data'
server:
address: '0.0.0.0:4433'
base_url: 'http://${LOCAL_IP}:4433'
EOF
msg_ok "Configured Hister"
msg_info "Creating Service"
cat <<EOF >/etc/systemd/system/hister.service
[Unit]
Description=Hister Search Engine
After=network.target
[Service]
Type=simple
User=root
ExecStart=/usr/local/bin/hister listen --config /etc/hister/config.yaml
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target
EOF
systemctl enable -q --now hister
msg_ok "Created Service"
motd_ssh
customize
cleanup_lxc
-98
View File
@@ -1,98 +0,0 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2026 community-scripts ORG
# Author: MickLesk (CanbiZ)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://github.com/vrtmrz/obsidian-livesync | https://couchdb.apache.org/
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
setting_up_container
network_check
update_os
setup_deb822_repo \
"couchdb" \
"https://couchdb.apache.org/repo/keys.asc" \
"https://apache.jfrog.io/artifactory/couchdb-deb/" \
"$(get_os_info codename)" \
"main"
msg_info "Installing CouchDB"
COUCHDB_ADMIN_USER="admin"
COUCHDB_PASSWORD="$(openssl rand -hex 24)"
COUCHDB_COOKIE="$(openssl rand -hex 16)"
cat <<EOF | debconf-set-selections
couchdb couchdb/mode select standalone
couchdb couchdb/mode seen true
couchdb couchdb/bindaddress string 0.0.0.0
couchdb couchdb/bindaddress seen true
couchdb couchdb/cookie string ${COUCHDB_COOKIE}
couchdb couchdb/cookie seen true
couchdb couchdb/adminpass password ${COUCHDB_PASSWORD}
couchdb couchdb/adminpass seen true
couchdb couchdb/adminpass_again password ${COUCHDB_PASSWORD}
couchdb couchdb/adminpass_again seen true
EOF
DEBIAN_FRONTEND=noninteractive $STD apt-get install -y couchdb
cat <<EOF >/root/.couchdb.credentials
COUCHDB_ADMIN_USER="${COUCHDB_ADMIN_USER}"
COUCHDB_ADMIN_PASSWORD="${COUCHDB_PASSWORD}"
COUCHDB_COOKIE="${COUCHDB_COOKIE}"
EOF
msg_ok "Installed CouchDB"
msg_info "Configuring CouchDB"
mkdir -p /opt/couchdb/etc/local.d /opt/obsidian-livesync
cat <<EOF >/opt/couchdb/etc/local.d/obsidian-livesync.ini
[couchdb]
single_node = true
max_document_size = 50000000
[admins]
admin = ${COUCHDB_PASSWORD}
[chttpd]
bind_address = 0.0.0.0
port = 5984
max_http_request_size = 4294967296
[chttpd_auth]
require_valid_user = true
[httpd]
enable_cors = true
WWW-Authenticate = Basic realm="couchdb"
[cors]
credentials = true
origins = app://obsidian.md,capacitor://localhost,http://localhost
headers = accept, authorization, content-type, origin, referer
methods = GET, PUT, POST, HEAD, DELETE
max_age = 3600
EOF
cat <<EOF >/opt/obsidian-livesync/.env
COUCHDB_URL=http://${LOCAL_IP}:5984
COUCHDB_USER=admin
COUCHDB_PASSWORD=${COUCHDB_PASSWORD}
COUCHDB_DATABASE=obsidiannotes
EOF
chmod 600 /opt/obsidian-livesync/.env
msg_ok "Configured CouchDB"
msg_info "Creating LiveSync Database"
systemctl enable -q couchdb
systemctl restart couchdb
for _ in {1..30}; do
curl -fsS -u "admin:${COUCHDB_PASSWORD}" -X PUT http://127.0.0.1:5984/obsidiannotes >/dev/null 2>&1 && break
sleep 1
done
msg_ok "Created LiveSync Database"
motd_ssh
customize
cleanup_lxc
+1 -1
View File
@@ -64,7 +64,7 @@ $STD sudo -u cool coolconfig set-admin-password --user=admin --password="$COOLPA
echo "$COOLPASS" >~/.coolpass
msg_ok "Installed Collabora Online"
fetch_and_deploy_gh_release "OpenCloud" "opencloud-eu/opencloud" "singlefile" "v7.4.0" "/usr/bin" "opencloud-*-linux-$(arch_resolve)"
fetch_and_deploy_gh_release "OpenCloud" "opencloud-eu/opencloud" "singlefile" "v7.3.0" "/usr/bin" "opencloud-*-linux-$(arch_resolve)"
mv /usr/bin/OpenCloud /usr/bin/opencloud
msg_info "Configuring OpenCloud"
+18 -19
View File
@@ -1292,17 +1292,14 @@ create_temp_dir() {
# - Copies each given file/directory into a persistent store at
# /opt/<NSAPP>.backup, mirroring its absolute path inside the store, and
# records it in a manifest so restore_backup needs no arguments.
# - Idempotent per path: a path already recorded in the manifest (from this
# run or a previous failed one) is left untouched, keeping the
# last-known-good copy instead of overwriting it with now-partially-updated
# data on retry. Any requested path NOT yet in the manifest is backed up
# now and appended - so a manifest left incomplete by an interrupted prior
# run gets completed instead of silently missing paths on restore.
# - Idempotent: if a store from a previous (failed) run already exists, it is
# left untouched and no new backup is taken. This keeps the last-known-good
# data instead of overwriting it with now-partially-updated data on retry.
# - Missing source paths are skipped with a warning (not fatal).
# - Aborts the update on copy failure: if any file/dir cannot be backed up,
# the script exits before the update runs against unprotected data (the
# paths already recorded are left in place, so a retry only redoes the one
# that failed).
# the half-written store is removed and the script exits, so the update
# never runs against unprotected data (and a retry re-attempts a clean
# backup rather than skipping it).
#
# restore_backup
# - Copies every path recorded in the manifest back to its origin (replacing
@@ -1321,17 +1318,19 @@ create_backup() {
return 0
}
if ! mkdir -p "$store" || ! touch "$manifest"; then
msg_error "Backup failed: could not create store at ${store} - aborting update"
exit 1
if [[ -f "$manifest" ]]; then
msg_ok "Existing backup found at ${store}, skipping backup"
return 0
fi
msg_info "Backing up data"
if ! mkdir -p "$store" || ! : >"$manifest"; then
msg_error "Backup failed: could not create store at ${store} - aborting update"
rm -rf "$store"
exit 1
fi
for path in "$@"; do
path="${path%/}"
if grep -qxF "$path" "$manifest" 2>/dev/null; then
continue
fi
if [[ ! -e "$path" ]]; then
msg_warn "Skipping backup of '${path}' (not found)"
continue
@@ -1339,6 +1338,7 @@ create_backup() {
dest="${store}/files${path}"
if ! mkdir -p "$(dirname "$dest")" || ! cp -a "$path" "$dest"; then
msg_error "Backup of '${path}' failed - aborting update"
rm -rf "$store"
exit 1
fi
echo "$path" >>"$manifest"
@@ -2040,9 +2040,8 @@ cleanup_orphaned_sources() {
local basename_file
basename_file=$(basename "$sources_file")
# NEVER remove the distro's own base sources file (debian.sources,
# ubuntu.sources, ...)
if [[ "$basename_file" == "$(get_os_info id).sources" ]]; then
# NEVER remove debian.sources - this is the standard Debian repository
if [[ "$basename_file" == "debian.sources" ]]; then
continue
fi
@@ -2114,7 +2113,7 @@ ensure_apt_working() {
# Step 4: More aggressive - remove all third-party sources
msg_warn "APT update still failing, removing third-party sources"
find /etc/apt/sources.list.d/ -type f \( -name "*.sources" -o -name "*.list" \) \
! -name "$(get_os_info id).sources" -delete 2>/dev/null || true
! -name "debian.sources" -delete 2>/dev/null || true
# Final attempt
if ! $STD apt update; then