mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-09-25 11:11:02 +00:00
@@ -26,19 +26,14 @@ function update_script() {
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
RELEASE=$(curl -fsSL https://api.github.com/repos/silverbulletmd/silverbullet/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
||||
if [[ ! -f "/opt/${APP}_version.txt" || "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
|
||||
if [[ ! -f ~/.silverbullet || "${RELEASE}" != "$(cat ~/.silverbullet 2>/dev/null)" ]]; then
|
||||
msg_info "Stopping ${APP}"
|
||||
systemctl stop silverbullet
|
||||
msg_ok "Stopped ${APP}"
|
||||
|
||||
msg_info "Updating ${APP} to v${RELEASE}"
|
||||
curl -fsSL "https://github.com/silverbulletmd/silverbullet/releases/download/${RELEASE}/silverbullet-server-linux-x86_64.zip" -o $(basename "https://github.com/silverbulletmd/silverbullet/releases/download/${RELEASE}/silverbullet-server-linux-x86_64.zip")
|
||||
$STD unzip silverbullet-server-linux-x86_64.zip
|
||||
mv silverbullet /opt/silverbullet/bin/
|
||||
chmod +x /opt/silverbullet/bin/silverbullet
|
||||
echo "${RELEASE}" >/opt/silverbullet/${APP}_version.txt
|
||||
msg_ok "Updated ${APP} to v${RELEASE}"
|
||||
fetch_and_deploy_gh_release "silverbullet" "silverbulletmd/silverbullet" "prebuild" "latest" "/opt/silverbullet/bin" "silverbullet-server-linux-x86_64.zip"
|
||||
|
||||
msg_info "Starting ${APP}"
|
||||
systemctl start silverbullet
|
||||
|
Reference in New Issue
Block a user