mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-07-03 12:37:38 +00:00
Compare commits
1 Commits
refactor_t
...
main
Author | SHA1 | Date | |
---|---|---|---|
a3ea46701c |
@ -3,7 +3,7 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV
|
||||
# Copyright (c) 2021-2025 tteck
|
||||
# Author: tteck (tteckster)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/TriliumNext/Trilium
|
||||
# Source: https://triliumnext.github.io/Docs/
|
||||
|
||||
APP="Trilium"
|
||||
var_tags="${var_tags:-notes}"
|
||||
@ -27,53 +27,57 @@ function update_script() {
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
RELEASE=$(curl -fsSL https://api.github.com/repos/TriliumNext/Trilium/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||
if [[ "${RELEASE}" != "$(cat ~/.Trilium 2>/dev/null)" ]] || [[ ! -f ~/.Trilium ]]; then
|
||||
|
||||
if [[ -d /opt/trilium/db ]]; then
|
||||
DB_PATH="/opt/trilium/db"
|
||||
DB_RESTORE_PATH="/opt/trilium/db"
|
||||
elif [[ -d /opt/trilium/assets/db ]]; then
|
||||
DB_PATH="/opt/trilium/assets/db"
|
||||
DB_RESTORE_PATH="/opt/trilium/assets/db"
|
||||
else
|
||||
msg_error "Database not found in either /opt/trilium/db or /opt/trilium/assets/db"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
msg_info "Stopping ${APP}"
|
||||
systemctl stop trilium
|
||||
sleep 1
|
||||
msg_ok "Stopped ${APP}"
|
||||
|
||||
msg_info "Backing up Database"
|
||||
mkdir -p /opt/trilium_backup
|
||||
cp -r "${DB_PATH}" /opt/trilium_backup/
|
||||
rm -rf /opt/trilium
|
||||
msg_ok "Backed up Database"
|
||||
|
||||
fetch_and_deploy_gh_release "Trilium" "TriliumNext/Trilium" "prebuild" "latest" "/opt/trilium" "TriliumNotes-Server-*-linux-x64.tar.xz"
|
||||
|
||||
# Restore database
|
||||
msg_info "Restoring Database"
|
||||
mkdir -p "$(dirname "${DB_RESTORE_PATH}")"
|
||||
cp -r /opt/trilium_backup/$(basename "${DB_PATH}") "${DB_RESTORE_PATH}"
|
||||
msg_ok "Restored Database"
|
||||
|
||||
msg_info "Cleaning up"
|
||||
rm -rf /opt/trilium_backup
|
||||
msg_ok "Cleaned"
|
||||
|
||||
msg_info "Starting ${APP}"
|
||||
systemctl start trilium
|
||||
sleep 1
|
||||
msg_ok "Started ${APP}"
|
||||
msg_ok "Updated Successfully"
|
||||
if [[ ! -f /opt/${APP}_version.txt ]]; then touch /opt/${APP}_version.txt; fi
|
||||
RELEASE=$(curl -fsSL https://api.github.com/repos/TriliumNext/Notes/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||
if [[ "v${RELEASE}" != "$(cat /opt/${APP}_version.txt 2>/dev/null)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then
|
||||
|
||||
if [[ -d /opt/trilium/db ]]; then
|
||||
DB_PATH="/opt/trilium/db"
|
||||
DB_RESTORE_PATH="/opt/trilium/db"
|
||||
elif [[ -d /opt/trilium/assets/db ]]; then
|
||||
DB_PATH="/opt/trilium/assets/db"
|
||||
DB_RESTORE_PATH="/opt/trilium/assets/db"
|
||||
else
|
||||
msg_ok "No update required. ${APP} is already at ${RELEASE}"
|
||||
msg_error "Database not found in either /opt/trilium/db or /opt/trilium/assets/db"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
exit
|
||||
msg_info "Stopping ${APP}"
|
||||
systemctl stop trilium
|
||||
sleep 1
|
||||
msg_ok "Stopped ${APP}"
|
||||
|
||||
msg_info "Updating to ${RELEASE}"
|
||||
mkdir -p /opt/trilium_backup
|
||||
cp -r "${DB_PATH}" /opt/trilium_backup/
|
||||
rm -rf /opt/trilium
|
||||
cd /tmp
|
||||
curl -fsSL "https://github.com/TriliumNext/trilium/releases/download/v${RELEASE}/TriliumNextNotes-Server-v${RELEASE}-linux-x64.tar.xz" -o "TriliumNextNotes-Server-v${RELEASE}-linux-x64.tar.xz"
|
||||
tar -xf "TriliumNextNotes-Server-v${RELEASE}-linux-x64.tar.xz"
|
||||
mv "TriliumNextNotes-Server-${RELEASE}-linux-x64" /opt/trilium
|
||||
|
||||
# Restore database
|
||||
mkdir -p "$(dirname "${DB_RESTORE_PATH}")"
|
||||
cp -r /opt/trilium_backup/$(basename "${DB_PATH}") "${DB_RESTORE_PATH}"
|
||||
|
||||
echo "v${RELEASE}" >/opt/${APP}_version.txt
|
||||
msg_ok "Updated to ${RELEASE}"
|
||||
|
||||
msg_info "Cleaning up"
|
||||
rm -rf "/tmp/TriliumNextNotes-Server-${RELEASE}-linux-x64.tar.xz"
|
||||
rm -rf /opt/trilium_backup
|
||||
msg_ok "Cleaned"
|
||||
|
||||
msg_info "Starting ${APP}"
|
||||
systemctl start trilium
|
||||
sleep 1
|
||||
msg_ok "Started ${APP}"
|
||||
msg_ok "Updated Successfully"
|
||||
else
|
||||
msg_ok "No update required. ${APP} is already at ${RELEASE}"
|
||||
fi
|
||||
|
||||
exit
|
||||
}
|
||||
|
||||
start
|
||||
|
8
frontend/public/json/trilium.json
generated
8
frontend/public/json/trilium.json
generated
@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "Trilium",
|
||||
"name": "TriliumNext",
|
||||
"slug": "trilium",
|
||||
"categories": [
|
||||
12
|
||||
@ -9,11 +9,11 @@
|
||||
"updateable": true,
|
||||
"privileged": false,
|
||||
"interface_port": 8080,
|
||||
"documentation": "https://github.com/TriliumNext/trilium/wiki",
|
||||
"documentation": "https://triliumnext.github.io/Docs/",
|
||||
"website": "https://github.com/TriliumNext/trilium",
|
||||
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/svg/trilium.svg",
|
||||
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/triliumnext.webp",
|
||||
"config_path": "/root/trilium-data/config.ini",
|
||||
"description": "Trilium is the latest and officially maintained version of the powerful, self-hosted note-taking and personal knowledge management application. It enables users to organize information in a hierarchical tree structure and supports rich text editing, internal linking, images, attachments, and powerful scripting capabilities. This version reflects the most current development efforts under the TriliumNext organization and replaces all prior forks or legacy variants. Trilium is ideal for building personal wikis, structured documentation, and long-term knowledge archives, giving users full local control and privacy.",
|
||||
"description": "TriliumNext is an newer Fork of Trilium. TriliumNext is an open-source note-taking and personal knowledge management application. It allows users to organize and manage their notes, ideas, and information in a single place, using a hierarchical tree-like structure. Trilium offers a range of features, including rich text formatting, links, images, and attachments, making it easy to create and structure notes. The software is designed to be flexible and customizable, with a range of customization options and plugins available, including themes, export options, and more. Trilium is a self-hosted solution, and can be run on a local machine or a cloud-based server, providing users with full control over their notes and information.",
|
||||
"install_methods": [
|
||||
{
|
||||
"type": "default",
|
||||
|
104
frontend/public/json/versions.json
generated
104
frontend/public/json/versions.json
generated
@ -1,4 +1,49 @@
|
||||
[
|
||||
{
|
||||
"name": "Dolibarr/dolibarr",
|
||||
"version": "18.0.7",
|
||||
"date": "2025-07-03T08:57:21Z"
|
||||
},
|
||||
{
|
||||
"name": "fuma-nama/fumadocs",
|
||||
"version": "fumadocs-openapi@9.0.17",
|
||||
"date": "2025-07-03T06:57:48Z"
|
||||
},
|
||||
{
|
||||
"name": "mattermost/mattermost",
|
||||
"version": "preview-v0.1",
|
||||
"date": "2025-06-27T14:35:47Z"
|
||||
},
|
||||
{
|
||||
"name": "Jackett/Jackett",
|
||||
"version": "v0.22.2111",
|
||||
"date": "2025-07-03T05:50:31Z"
|
||||
},
|
||||
{
|
||||
"name": "esphome/esphome",
|
||||
"version": "2025.6.3",
|
||||
"date": "2025-07-03T01:07:26Z"
|
||||
},
|
||||
{
|
||||
"name": "actualbudget/actual",
|
||||
"version": "v25.7.1",
|
||||
"date": "2025-07-03T01:03:18Z"
|
||||
},
|
||||
{
|
||||
"name": "mongodb/mongo",
|
||||
"version": "r6.0.25-rc0",
|
||||
"date": "2025-07-03T00:44:52Z"
|
||||
},
|
||||
{
|
||||
"name": "documenso/documenso",
|
||||
"version": "v1.12.2-rc.0",
|
||||
"date": "2025-07-03T00:31:22Z"
|
||||
},
|
||||
{
|
||||
"name": "cross-seed/cross-seed",
|
||||
"version": "v6.12.7",
|
||||
"date": "2025-06-18T03:44:24Z"
|
||||
},
|
||||
{
|
||||
"name": "emqx/emqx",
|
||||
"version": "v5.8.7",
|
||||
@ -19,6 +64,11 @@
|
||||
"version": "8.2-rc1-int",
|
||||
"date": "2025-07-02T19:27:08Z"
|
||||
},
|
||||
{
|
||||
"name": "keycloak/keycloak",
|
||||
"version": "26.3.0",
|
||||
"date": "2025-07-02T12:26:44Z"
|
||||
},
|
||||
{
|
||||
"name": "ollama/ollama",
|
||||
"version": "v0.9.5",
|
||||
@ -34,16 +84,6 @@
|
||||
"version": "2025.7.0",
|
||||
"date": "2025-07-02T16:23:42Z"
|
||||
},
|
||||
{
|
||||
"name": "cross-seed/cross-seed",
|
||||
"version": "v6.12.7",
|
||||
"date": "2025-06-18T03:44:24Z"
|
||||
},
|
||||
{
|
||||
"name": "fuma-nama/fumadocs",
|
||||
"version": "fumadocs-core@15.6.1",
|
||||
"date": "2025-07-02T15:29:41Z"
|
||||
},
|
||||
{
|
||||
"name": "nzbgetcom/nzbget",
|
||||
"version": "v25.1",
|
||||
@ -54,11 +94,6 @@
|
||||
"version": "6.2.5",
|
||||
"date": "2025-07-02T13:06:30Z"
|
||||
},
|
||||
{
|
||||
"name": "keycloak/keycloak",
|
||||
"version": "26.2.5",
|
||||
"date": "2025-05-28T06:49:43Z"
|
||||
},
|
||||
{
|
||||
"name": "wazuh/wazuh",
|
||||
"version": "coverity-w27-4.13.0",
|
||||
@ -79,11 +114,6 @@
|
||||
"version": "release-5.1.2",
|
||||
"date": "2025-07-02T06:13:16Z"
|
||||
},
|
||||
{
|
||||
"name": "Jackett/Jackett",
|
||||
"version": "v0.22.2107",
|
||||
"date": "2025-07-02T05:53:02Z"
|
||||
},
|
||||
{
|
||||
"name": "diced/zipline",
|
||||
"version": "v4.2.0",
|
||||
@ -99,21 +129,11 @@
|
||||
"version": "2.1.1",
|
||||
"date": "2025-06-14T17:45:06Z"
|
||||
},
|
||||
{
|
||||
"name": "mongodb/mongo",
|
||||
"version": "r8.1.2",
|
||||
"date": "2025-07-01T22:39:32Z"
|
||||
},
|
||||
{
|
||||
"name": "Threadfin/Threadfin",
|
||||
"version": "1.2.35",
|
||||
"date": "2025-07-01T21:37:20Z"
|
||||
},
|
||||
{
|
||||
"name": "actualbudget/actual",
|
||||
"version": "v25.7.0",
|
||||
"date": "2025-07-01T21:02:27Z"
|
||||
},
|
||||
{
|
||||
"name": "TwiN/gatus",
|
||||
"version": "v5.19.0",
|
||||
@ -209,21 +229,11 @@
|
||||
"version": "v8.1.17",
|
||||
"date": "2025-06-30T11:26:27Z"
|
||||
},
|
||||
{
|
||||
"name": "documenso/documenso",
|
||||
"version": "v1.12.0-rc.8",
|
||||
"date": "2025-06-30T09:47:37Z"
|
||||
},
|
||||
{
|
||||
"name": "PrivateBin/PrivateBin",
|
||||
"version": "1.7.8",
|
||||
"date": "2025-06-30T09:00:54Z"
|
||||
},
|
||||
{
|
||||
"name": "mattermost/mattermost",
|
||||
"version": "preview-v0.1",
|
||||
"date": "2025-06-27T14:35:47Z"
|
||||
},
|
||||
{
|
||||
"name": "typesense/typesense",
|
||||
"version": "v29.0",
|
||||
@ -254,11 +264,6 @@
|
||||
"version": "3.1.0",
|
||||
"date": "2025-06-28T09:02:38Z"
|
||||
},
|
||||
{
|
||||
"name": "esphome/esphome",
|
||||
"version": "2025.6.2",
|
||||
"date": "2025-06-28T03:47:16Z"
|
||||
},
|
||||
{
|
||||
"name": "plexguide/Huntarr.io",
|
||||
"version": "8.1.11",
|
||||
@ -349,11 +354,6 @@
|
||||
"version": "4.1.0-beta.2",
|
||||
"date": "2025-06-26T14:23:26Z"
|
||||
},
|
||||
{
|
||||
"name": "Dolibarr/dolibarr",
|
||||
"version": "18.0.7",
|
||||
"date": "2025-06-26T09:16:33Z"
|
||||
},
|
||||
{
|
||||
"name": "gristlabs/grist-core",
|
||||
"version": "v1.6.1",
|
||||
@ -416,8 +416,8 @@
|
||||
},
|
||||
{
|
||||
"name": "runtipi/runtipi",
|
||||
"version": "nightly",
|
||||
"date": "2025-06-23T19:10:33Z"
|
||||
"version": "v4.2.1",
|
||||
"date": "2025-06-03T20:04:28Z"
|
||||
},
|
||||
{
|
||||
"name": "VictoriaMetrics/VictoriaMetrics",
|
||||
|
@ -3,7 +3,7 @@
|
||||
# Copyright (c) 2021-2025 tteck
|
||||
# Author: tteck (tteckster)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/TriliumNext/Trilium
|
||||
# Source: https://triliumnext.github.io/Docs/
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
@ -13,7 +13,14 @@ setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
fetch_and_deploy_gh_release "Trilium" "TriliumNext/Trilium" "prebuild" "latest" "/opt/trilium" "TriliumNotes-Server-*-linux-x64.tar.xz"
|
||||
msg_info "Setup TriliumNext"
|
||||
cd /opt
|
||||
RELEASE=$(curl -fsSL https://api.github.com/repos/TriliumNext/trilium/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||
curl -fsSL "https://github.com/TriliumNext/trilium/releases/download/v${RELEASE}/TriliumNextNotes-Server-v${RELEASE}-linux-x64.tar.xz" -o "TriliumNextNotes-Server-v${RELEASE}-linux-x64.tar.xz"
|
||||
tar -xf TriliumNextNotes-Server-v${RELEASE}-linux-x64.tar.xz
|
||||
mv TriliumNextNotes-Server-$RELEASE-linux-x64 /opt/trilium
|
||||
echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt"
|
||||
msg_ok "Setup TriliumNext"
|
||||
|
||||
msg_info "Creating Service"
|
||||
cat <<EOF >/etc/systemd/system/trilium.service
|
||||
@ -39,6 +46,7 @@ motd_ssh
|
||||
customize
|
||||
|
||||
msg_info "Cleaning up"
|
||||
rm -rf /opt/TriliumNextNotes-Server-${RELEASE}-linux-x64.tar.xz
|
||||
$STD apt-get -y autoremove
|
||||
$STD apt-get -y autoclean
|
||||
msg_ok "Cleaned"
|
||||
|
Reference in New Issue
Block a user