Compare commits

...

11 Commits

Author SHA1 Message Date
0738004ecb Update CHANGELOG.md 2025-07-03 13:49:24 +00:00
5ac4818030 Refactor: Trilium (#5665)
* Refactor: Trilium

* change name & description of trilium

* finalize

* Change Logo to new selfhst

* Update trilium.sh

---------

Co-authored-by: Tobias <96661824+CrazyWolf13@users.noreply.github.com>
2025-07-03 15:49:02 +02:00
c293b058c0 Update CHANGELOG.md (#5670)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-07-03 14:32:42 +01:00
cadeee4deb Improve asset matching in fetch_and_deploy_gh_release for prebuild and singlefile modes (#5669)
* Improve asset matching in fetch_and_deploy_gh_release for prebuild and singlefile modes

* tar globbing

* Update tools.func
2025-07-03 15:32:12 +02:00
f401c7cc4c Improve asset matching in fetch_and_deploy_gh_release for prebuild and singlefile modes 2025-07-03 15:16:42 +02:00
a3ea46701c Update versions.json (#5667)
Some checks failed
Auto Update .app-files / update-app-files (push) Has been cancelled
Create Changelog Pull Request / update-changelog-pull-request (push) Has been cancelled
Close Discussion on PR Merge / close-discussion (push) Has been cancelled
Frontend CI/CD / build (push) Has been cancelled
Frontend CI/CD / deploy (push) Has been cancelled
Sync to Gitea / sync (push) Has been cancelled
Co-authored-by: GitHub Actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-07-03 14:07:50 +02:00
009178a3dc Update CHANGELOG.md (#5664)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-07-03 11:59:04 +01:00
38e8b70873 Bump Icons to selfhst repo | switch svg to webp (#5659) 2025-07-03 12:58:26 +02:00
31cda26096 Update CHANGELOG.md (#5663)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-07-03 11:54:09 +01:00
e16aac7a83 Fix typo (#5662) 2025-07-03 12:53:30 +02:00
2a52baf57e Update qbittorrent.sh (#5661) 2025-07-03 11:12:15 +02:00
20 changed files with 169 additions and 140 deletions

View File

@ -16,6 +16,26 @@ All LXC instances created using this repository come pre-installed with Midnight
## 2025-07-03
### 🚀 Updated Scripts
- #### 🐞 Bug Fixes
- Zipline: Fix typo in uploads directory path [@tremor021](https://github.com/tremor021) ([#5662](https://github.com/community-scripts/ProxmoxVE/pull/5662))
- #### ✨ New Features
- Improve asset matching in fetch_and_deploy_gh_release for prebuild and singlefile modes [@MickLesk](https://github.com/MickLesk) ([#5669](https://github.com/community-scripts/ProxmoxVE/pull/5669))
- #### 🔧 Refactor
- Refactor: Trilium [@MickLesk](https://github.com/MickLesk) ([#5665](https://github.com/community-scripts/ProxmoxVE/pull/5665))
### 🌐 Website
- #### 📝 Script Information
- Bump Icons to selfhst repo | switch svg to webp [@MickLesk](https://github.com/MickLesk) ([#5659](https://github.com/community-scripts/ProxmoxVE/pull/5659))
## 2025-07-02
### 🚀 Updated Scripts

View File

@ -31,7 +31,7 @@ function update_script() {
touch /opt/${APP}_version.txt
mkdir -p $HOME/.config/qBittorrent/
mkdir -p /opt/qbittorrent/
mv /.config/qBittorrent $HOME/.config/
[ -d "/.config/qBittorrent" ] && mv /.config/qBittorrent "$HOME/.config/"
$STD apt-get remove --purge -y qbittorrent-nox
sed -i 's@ExecStart=/usr/bin/qbittorrent-nox@ExecStart=/opt/qbittorrent/qbittorrent-nox@g' /etc/systemd/system/qbittorrent-nox.service
systemctl daemon-reload
@ -67,4 +67,4 @@ 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}:8090${CL}"
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8090${CL}"

View File

@ -3,9 +3,9 @@ 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://triliumnext.github.io/Docs/
# Source: https://github.com/TriliumNext/Trilium
APP="Trilium"
APP="Trilium Notes"
var_tags="${var_tags:-notes}"
var_cpu="${var_cpu:-1}"
var_ram="${var_ram:-512}"
@ -27,57 +27,52 @@ function update_script() {
msg_error "No ${APP} Installation Found!"
exit
fi
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"
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"
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"
else
msg_error "Database not found in either /opt/trilium/db or /opt/trilium/assets/db"
exit 1
msg_ok "No update required. ${APP} is already at ${RELEASE}"
fi
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
exit
}
start

View File

@ -40,9 +40,9 @@ function update_script() {
msg_info "Updating ${APP} to ${RELEASE}"
cp /opt/zipline/.env /opt/
mkdir -p /opt/zipline-upload
if [ -d /opt/zipline/upload ] && [ "$(ls -A /opt/zipline/upload)" ]; then
cp -R /opt/zipline/upload/* /opt/zipline-upload/
mkdir -p /opt/zipline-uploads
if [ -d /opt/zipline/uploads ] && [ "$(ls -A /opt/zipline/uploads)" ]; then
cp -R /opt/zipline/uploads/* /opt/zipline-uploads/
fi
curl -fsSL "https://github.com/diced/zipline/archive/refs/tags/v${RELEASE}.zip" -o $(basename "https://github.com/diced/zipline/archive/refs/tags/v${RELEASE}.zip")
$STD unzip v"${RELEASE}".zip

View File

@ -11,7 +11,7 @@
"interface_port": null,
"documentation": null,
"website": null,
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/svg/proxmox.svg",
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/proxmox.webp",
"config_path": "/opt/iptag/iptag.conf",
"description": "This script automatically adds IP address as tags to LXC containers or VM's using a systemd service. The service also updates the tags if a LXC/VM IP address is changed.",
"install_methods": [

View File

@ -11,7 +11,7 @@
"interface_port": 80,
"documentation": "https://docs.baby-buddy.net/",
"website": "https://github.com/babybuddy/babybuddy",
"logo": "https://raw.githubusercontent.com/selfhst/icons/refs/heads/main/svg/baby-buddy.svg",
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/baby-buddy.webp",
"config_path": "/opt/babybuddy/babybuddy/settings/production.py",
"description": "Baby Buddy is an open-source web application designed to assist caregivers in tracking various aspects of a baby's daily routine, including sleep, feedings, diaper changes, tummy time, and more. By recording this data, caregivers can better understand and anticipate their baby's needs, reducing guesswork in daily care. The application offers a user-friendly dashboard for data entry and visualization, supports multiple users, and provides features like timers and reminders. Additionally, Baby Buddy can be integrated with platforms like Home Assistant and Grafana for enhanced functionality.",
"install_methods": [

View File

@ -12,7 +12,7 @@
"interface_port": 3000,
"documentation": "https://github.com/C4illin/ConvertX",
"website": "https://github.com/C4illin/ConvertX",
"logo": "https://raw.githubusercontent.com/selfhst/icons/refs/heads/main/svg/convertx.svg",
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/convertx.webp",
"description": "ConvertX is a self-hosted online file converter supporting over 1000 formats, including images, audio, video, documents, and more, powered by FFmpeg, GraphicsMagick, and other libraries.",
"install_methods": [
{

View File

@ -12,7 +12,7 @@
"documentation": "https://github.com/plexguide/Huntarr.io/wiki",
"config_path": "/opt/huntarr",
"website": "https://github.com/plexguide/Huntarr.io",
"logo": "https://raw.githubusercontent.com/plexguide/Huntarr.io/refs/heads/main/frontend/static/logo/Huntarr.svg",
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/huntarr.webp",
"description": "Huntarr is a tool that automates the search for missing or low-quality media content in your collection. It works seamlessly with applications like Sonarr, Radarr, Lidarr, Readarr, and Whisparr, enhancing their functionality with continuous background scans to identify and update missed or outdated content. Through a user-friendly web interface accessible on port 9705, Huntarr provides real-time statistics, log views, and extensive configuration options. The software is especially useful for users who want to keep their media library up to date by automatically searching for missing episodes or higher-quality versions. Huntarr is well-suited for self-hosted environments and can easily run in LXC containers or Docker setups.",
"install_methods": [
{

View File

@ -11,7 +11,7 @@
"interface_port": 80,
"documentation": "https://wiki.itsm-ng.org/en/home",
"website": "https://itsm-ng.com",
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/svg/itsm-ng.svg",
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/itsm-ng.webp",
"config_path": "/etc/itsm-ng",
"description": "ITSM-NG is a powerful, open-source IT Service Management (ITSM) solution designed for managing IT assets, software, licenses, and support processes in accordance with ITIL best practices. It offers integrated features for asset inventory, incident tracking, problem management, change requests, and service desk workflows.",
"install_methods": [

View File

@ -12,7 +12,7 @@
"interface_port": 8080,
"documentation": "https://github.com/librespeed/speedtest-rust",
"website": "https://github.com/librespeed/speedtest-rust",
"logo": "https://raw.githubusercontent.com/selfhst/icons/refs/heads/main/svg/librespeed.svg",
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/librespeed.webp",
"description": "Librespeed is a no flash, no java, no websocket speedtest server. This community script deploys the rust version for simplicity and low resource usage.",
"install_methods": [
{

View File

@ -12,7 +12,7 @@
"interface_port": 9000,
"documentation": "https://lyrion.org/",
"website": "https://lyrion.org/",
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/lyrion-media-server.webp",
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/lyrion-music-server.webp",
"description": "Lyrion Music Server is an open-source server software to stream local music collections, internet radio, and music services to Squeezebox and compatible audio players.",
"install_methods": [
{

View File

@ -12,7 +12,7 @@
"interface_port": null,
"documentation": "https://oauth2-proxy.github.io/oauth2-proxy/configuration/overview",
"website": "https://oauth2-proxy.github.io/oauth2-proxy/",
"logo": "https://raw.githubusercontent.com/oauth2-proxy/oauth2-proxy/f82e90426a1881d36bf995f25de9b7b1db4c2564/docs/static/img/logos/OAuth2_Proxy_icon.svg",
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/oauth2-proxy.webp",
"config_path": "/opt/oauth2-proxy/config.toml",
"description": "A reverse proxy that provides authentication with Google, Azure, OpenID Connect and many more identity providers.",
"install_methods": [

View File

@ -11,7 +11,7 @@
"interface_port": 7655,
"documentation": null,
"website": "https://github.com/rcourtman/Pulse",
"logo": "https://raw.githubusercontent.com/rcourtman/Pulse/main/src/public/logos/pulse-logo-256x256.png",
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/pulse.webp",
"config_path": "/opt/pulse/.env",
"description": "A lightweight monitoring application for Proxmox VE that displays real-time status for VMs and containers via a simple web interface.",
"install_methods": [

View File

@ -11,7 +11,7 @@
"interface_port": 3000,
"documentation": "https://rclone.org/docs/",
"website": "https://rclone.org/",
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/svg/rclone.svg",
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/rclone.webp",
"config_path": "~/.config/rclone/rclone.conf",
"description": "Rclone is a command-line program to manage files on cloud storage. It is a feature-rich alternative to cloud vendors' web storage interfaces",
"install_methods": [

View File

@ -12,7 +12,7 @@
"documentation": "https://github.com/CrazyWolf13/streamlink-webui",
"config_path": "/opt/streamlink-webui.env",
"website": "https://github.com/CrazyWolf13/streamlink-webui",
"logo": "https://streamlink.github.io/_static/icon.svg",
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/streamlink.webp",
"description": "a simple web-ui to the well-known streamlink cli application, which allows you to save twitch streams to your local disk.",
"install_methods": [
{

View File

@ -1,5 +1,5 @@
{
"name": "TriliumNext",
"name": "Trilium Notes",
"slug": "trilium",
"categories": [
12
@ -9,11 +9,11 @@
"updateable": true,
"privileged": false,
"interface_port": 8080,
"documentation": "https://triliumnext.github.io/Docs/",
"documentation": "https://github.com/TriliumNext/trilium/wiki",
"website": "https://github.com/TriliumNext/trilium",
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/triliumnext.webp",
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/trilium-notes.webp",
"config_path": "/root/trilium-data/config.ini",
"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.",
"description": "Trilium Notes 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.",
"install_methods": [
{
"type": "default",

View File

@ -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",

View File

@ -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://triliumnext.github.io/Docs/
# Source: https://github.com/TriliumNext/Trilium
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
@ -13,14 +13,7 @@ setting_up_container
network_check
update_os
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"
fetch_and_deploy_gh_release "Trilium" "TriliumNext/Trilium" "prebuild" "latest" "/opt/trilium" "TriliumNotes-Server-*linux-x64.tar.xz"
msg_info "Creating Service"
cat <<EOF >/etc/systemd/system/trilium.service
@ -46,7 +39,6 @@ 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"

View File

@ -50,9 +50,9 @@ CORE_HOSTNAME=0.0.0.0
CORE_PORT=3000
CORE_RETURN_HTTPS=false
DATASOURCE_TYPE=local
DATASOURCE_LOCAL_DIRECTORY=/opt/zipline-upload
DATASOURCE_LOCAL_DIRECTORY=/opt/zipline-uploads
EOF
mkdir -p /opt/zipline-upload
mkdir -p /opt/zipline-uploads
$STD pnpm install
$STD pnpm build
echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt"

View File

@ -819,6 +819,7 @@ function fetch_and_deploy_gh_release() {
msg_info "Fetching GitHub release: $app ($version)"
### Tarball Mode ###
if [[ "$mode" == "tarball" || "$mode" == "source" ]]; then
url=$(echo "$json" | jq -r '.tarball_url // empty')
[[ -z "$url" ]] && url="https://github.com/$repo/archive/refs/tags/v$version.tar.gz"
@ -839,6 +840,7 @@ function fetch_and_deploy_gh_release() {
cp -r "$unpack_dir"/* "$target/"
shopt -u dotglob nullglob
### Binary Mode ###
elif [[ "$mode" == "binary" ]]; then
local arch
arch=$(dpkg --print-architecture 2>/dev/null || uname -m)
@ -848,12 +850,14 @@ function fetch_and_deploy_gh_release() {
local assets url_match=""
assets=$(echo "$json" | jq -r '.assets[].browser_download_url')
# If explicit filename pattern is provided (param $6), match that first
if [[ -n "$6" ]]; then
for u in $assets; do
[[ "$u" =~ $6 || "$u" == *"$6" ]] && url_match="$u" && break
done
fi
# If no match via explicit pattern, fall back to architecture heuristic
if [[ -z "$url_match" ]]; then
for u in $assets; do
if [[ "$u" =~ ($arch|amd64|x86_64|aarch64|arm64).*\.deb$ ]]; then
@ -863,6 +867,7 @@ function fetch_and_deploy_gh_release() {
done
fi
# Fallback: any .deb file
if [[ -z "$url_match" ]]; then
for u in $assets; do
[[ "$u" =~ \.deb$ ]] && url_match="$u" && break
@ -891,8 +896,10 @@ function fetch_and_deploy_gh_release() {
}
}
### Prebuild Mode ###
elif [[ "$mode" == "prebuild" ]]; then
local pattern="$6"
local pattern="${6%\"}"
pattern="${pattern#\"}"
[[ -z "$pattern" ]] && {
msg_error "Mode 'prebuild' requires 6th parameter (asset filename pattern)"
rm -rf "$tmpdir"
@ -901,7 +908,14 @@ function fetch_and_deploy_gh_release() {
local asset_url=""
for u in $(echo "$json" | jq -r '.assets[].browser_download_url'); do
[[ "$u" =~ $pattern || "$u" == *"$pattern" ]] && asset_url="$u" && break
filename_candidate="${u##*/}"
case "$filename_candidate" in
$pattern)
asset_url="$u"
break
;;
esac
done
[[ -z "$asset_url" ]] && {
@ -923,16 +937,18 @@ function fetch_and_deploy_gh_release() {
$STD apt-get install -y unzip
fi
$STD unzip "$tmpdir/$filename" -d "$target"
elif [[ "$filename" == *.tar.gz ]]; then
tar -xzf "$tmpdir/$filename" -C "$target"
elif [[ "$filename" == *.tar.* ]]; then
tar --strip-components=1 -xf "$tmpdir/$filename" -C "$target"
else
msg_error "Unsupported archive format: $filename"
rm -rf "$tmpdir"
return 1
fi
### Singlefile Mode ###
elif [[ "$mode" == "singlefile" ]]; then
local pattern="$6"
local pattern="${6%\"}"
pattern="${pattern#\"}"
[[ -z "$pattern" ]] && {
msg_error "Mode 'singlefile' requires 6th parameter (asset filename pattern)"
rm -rf "$tmpdir"
@ -941,7 +957,13 @@ function fetch_and_deploy_gh_release() {
local asset_url=""
for u in $(echo "$json" | jq -r '.assets[].browser_download_url'); do
[[ "$u" =~ $pattern || "$u" == *"$pattern" ]] && asset_url="$u" && break
filename_candidate="${u##*/}"
case "$filename_candidate" in
$pattern)
asset_url="$u"
break
;;
esac
done
[[ -z "$asset_url" ]] && {