mirror of
https://github.com/tteck/Proxmox.git
synced 2025-01-12 15:21:57 +00:00
Compare commits
No commits in common. "e643fe6699ff4f1ac1a4ec342bb1498061d92145" and "1ec52d08a3a7a5bf7de312f0b8a2abcdf91e1264" have entirely different histories.
e643fe6699
...
1ec52d08a3
@ -55,21 +55,21 @@ function default_settings() {
|
||||
function update_script() {
|
||||
header_info
|
||||
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, 2, length($2)-3) }')
|
||||
RELEASE=$(curl -s https://api.github.com/repos/TriliumNext/Notes/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||
|
||||
msg_info "Stopping ${APP}"
|
||||
systemctl stop trilium.service
|
||||
sleep 1
|
||||
msg_ok "Stopped ${APP}"
|
||||
|
||||
msg_info "Updating to ${RELEASE}"
|
||||
wget -q https://github.com/TriliumNext/Notes/releases/download/${RELEASE}/TriliumNextNotes-${RELEASE}-server-linux-x64.tar.xz
|
||||
tar -xf TriliumNextNotes-${RELEASE}-server-linux-x64.tar.xz
|
||||
msg_info "Updating to v${RELEASE}"
|
||||
wget -q https://github.com/TriliumNext/Notes/releases/download/v$RELEASE/trilium-linux-x64-server-$RELEASE.tar.xz
|
||||
tar -xvf trilium-linux-x64-server-$RELEASE.tar.xz &>/dev/null
|
||||
cp -r trilium-linux-x64-server/* /opt/trilium/
|
||||
msg_ok "Updated to ${RELEASE}"
|
||||
msg_ok "Updated to v${RELEASE}"
|
||||
|
||||
msg_info "Cleaning up"
|
||||
rm -rf TriliumNextNotes-${RELEASE}-server-linux-x64.tar.xz trilium-linux-x64-server
|
||||
rm -rf trilium-linux-x64-server-$RELEASE.tar.xz trilium-linux-x64-server
|
||||
msg_ok "Cleaned"
|
||||
|
||||
msg_info "Starting ${APP}"
|
||||
|
@ -19,11 +19,11 @@ $STD apt-get install -y sudo
|
||||
$STD apt-get install -y mc
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
RELEASE=$(curl -s https://api.github.com/repos/TriliumNext/Notes/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
||||
RELEASE=$(curl -s https://api.github.com/repos/TriliumNext/Notes/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||
|
||||
msg_info "Installing TriliumNext"
|
||||
wget -q https://github.com/TriliumNext/Notes/releases/download/${RELEASE}/TriliumNextNotes-${RELEASE}-server-linux-x64.tar.xz
|
||||
tar -xf TriliumNextNotes-${RELEASE}-server-linux-x64.tar.xz
|
||||
wget -q https://github.com/TriliumNext/Notes/releases/download/v$RELEASE/trilium-linux-x64-server-$RELEASE.tar.xz
|
||||
$STD tar -xvf trilium-linux-x64-server-$RELEASE.tar.xz
|
||||
mv trilium-linux-x64-server /opt/trilium
|
||||
msg_ok "Installed TriliumNext"
|
||||
|
||||
@ -53,5 +53,5 @@ customize
|
||||
msg_info "Cleaning up"
|
||||
$STD apt-get -y autoremove
|
||||
$STD apt-get -y autoclean
|
||||
rm -rf TriliumNextNotes-${RELEASE}-server-linux-x64.tar.xz
|
||||
rm -rf /root/trilium-linux-x64-server-$RELEASE.tar.xz
|
||||
msg_ok "Cleaned"
|
||||
|
Loading…
x
Reference in New Issue
Block a user