Compare commits

...

2 Commits

Author SHA1 Message Date
tteckster
e643fe6699
Update trilium-install.sh
fix release path
2024-10-19 08:55:49 -04:00
tteckster
fe9736fd38
Update trilium.sh
- fix release path changes
- fixes https://github.com/tteck/Proxmox/issues/3930
2024-10-19 08:52:08 -04:00
2 changed files with 10 additions and 10 deletions

View File

@ -55,21 +55,21 @@ function default_settings() {
function update_script() { function update_script() {
header_info header_info
if [[ ! -d /opt/trilium ]]; then msg_error "No ${APP} Installation Found!"; exit; fi if [[ ! -d /opt/trilium ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
RELEASE=$(curl -s https://api.github.com/repos/TriliumNext/Notes/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') RELEASE=$(curl -s https://api.github.com/repos/TriliumNext/Notes/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
msg_info "Stopping ${APP}" msg_info "Stopping ${APP}"
systemctl stop trilium.service systemctl stop trilium.service
sleep 1 sleep 1
msg_ok "Stopped ${APP}" msg_ok "Stopped ${APP}"
msg_info "Updating to v${RELEASE}" msg_info "Updating to ${RELEASE}"
wget -q https://github.com/TriliumNext/Notes/releases/download/v$RELEASE/trilium-linux-x64-server-$RELEASE.tar.xz wget -q https://github.com/TriliumNext/Notes/releases/download/${RELEASE}/TriliumNextNotes-${RELEASE}-server-linux-x64.tar.xz
tar -xvf trilium-linux-x64-server-$RELEASE.tar.xz &>/dev/null tar -xf TriliumNextNotes-${RELEASE}-server-linux-x64.tar.xz
cp -r trilium-linux-x64-server/* /opt/trilium/ cp -r trilium-linux-x64-server/* /opt/trilium/
msg_ok "Updated to v${RELEASE}" msg_ok "Updated to ${RELEASE}"
msg_info "Cleaning up" msg_info "Cleaning up"
rm -rf trilium-linux-x64-server-$RELEASE.tar.xz trilium-linux-x64-server rm -rf TriliumNextNotes-${RELEASE}-server-linux-x64.tar.xz trilium-linux-x64-server
msg_ok "Cleaned" msg_ok "Cleaned"
msg_info "Starting ${APP}" msg_info "Starting ${APP}"

View File

@ -19,11 +19,11 @@ $STD apt-get install -y sudo
$STD apt-get install -y mc $STD apt-get install -y mc
msg_ok "Installed Dependencies" msg_ok "Installed Dependencies"
RELEASE=$(curl -s https://api.github.com/repos/TriliumNext/Notes/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') RELEASE=$(curl -s https://api.github.com/repos/TriliumNext/Notes/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
msg_info "Installing TriliumNext" msg_info "Installing TriliumNext"
wget -q https://github.com/TriliumNext/Notes/releases/download/v$RELEASE/trilium-linux-x64-server-$RELEASE.tar.xz wget -q https://github.com/TriliumNext/Notes/releases/download/${RELEASE}/TriliumNextNotes-${RELEASE}-server-linux-x64.tar.xz
$STD tar -xvf trilium-linux-x64-server-$RELEASE.tar.xz tar -xf TriliumNextNotes-${RELEASE}-server-linux-x64.tar.xz
mv trilium-linux-x64-server /opt/trilium mv trilium-linux-x64-server /opt/trilium
msg_ok "Installed TriliumNext" msg_ok "Installed TriliumNext"
@ -53,5 +53,5 @@ customize
msg_info "Cleaning up" msg_info "Cleaning up"
$STD apt-get -y autoremove $STD apt-get -y autoremove
$STD apt-get -y autoclean $STD apt-get -y autoclean
rm -rf /root/trilium-linux-x64-server-$RELEASE.tar.xz rm -rf TriliumNextNotes-${RELEASE}-server-linux-x64.tar.xz
msg_ok "Cleaned" msg_ok "Cleaned"