mirror of
https://github.com/community-scripts/ProxmoxVE
synced 2025-03-13 00:50:01 +00:00
fixes
This commit is contained in:
parent
8d52408ea2
commit
c9583be8fc
@ -30,27 +30,27 @@ function update_script() {
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
VERSION=$(curl -s https://api.github.com/repos/Suwayomi/Suwayomi-Server/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
||||
if [[ "${VERSION}" != "$(cat /opt/suwayomi-server_version.txt)" ]] || [[ ! -f /opt/suwayomi-server_version.txt ]]; then
|
||||
RELEASE=$(curl -s https://api.github.com/repos/Suwayomi/Suwayomi-Server/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
||||
if [[ "${RELEASE}" != "$(cat /opt/suwayomi-server_version.txt)" ]] || [[ ! -f /opt/suwayomi-server_version.txt ]]; then
|
||||
msg_info "Updating $APP"
|
||||
msg_info "Stopping $APP"
|
||||
systemctl stop suwayomi-server
|
||||
msg_ok "Stopped $APP"
|
||||
msg_info "Updating $APP to v${VERSION}"
|
||||
RELEASE=$(curl -s https://api.github.com/repos/Suwayomi/Suwayomi-Server/releases/latest | grep "browser_download_url" | awk '{print substr($2, 2, length($2)-2) }' | tail -n+2 | head -n 1)
|
||||
wget -q $RELEASE
|
||||
msg_info "Updating $APP to v${RELEASE}"
|
||||
URL=$(curl -s https://api.github.com/repos/Suwayomi/Suwayomi-Server/releases/latest | grep "browser_download_url" | awk '{print substr($2, 2, length($2)-2) }' | tail -n+2 | head -n 1)
|
||||
wget -q $URL
|
||||
$STD dpkg -i *.deb
|
||||
msg_ok "Updated $APP to v${VERSION}"
|
||||
msg_ok "Updated $APP to v${RELEASE}"
|
||||
msg_info "Starting $APP"
|
||||
systemctl start suwayomi-server
|
||||
msg_ok "Started $APP"
|
||||
msg_info "Cleaning Up"
|
||||
rm -f *.deb
|
||||
msg_ok "Cleanup Completed"
|
||||
echo "${VERSION}" >/opt/${APP}_version.txt
|
||||
echo "${RELEASE}" >/opt/suwayomi-server_version.txt.txt
|
||||
msg_ok "Update Successful"
|
||||
else
|
||||
msg_ok "No update required. ${APP} is already at v${VERSION}"
|
||||
msg_ok "No update required. ${APP} is already at v${RELEASE}"
|
||||
fi
|
||||
exit
|
||||
}
|
||||
|
@ -22,12 +22,12 @@ $STD apt-get install -y \
|
||||
libc++-dev
|
||||
msg_ok "Installed Dependencies"
|
||||
msg_info "Settting up Suwayomi-Server"
|
||||
RELEASE=$(curl -s https://api.github.com/repos/Suwayomi/Suwayomi-Server/releases/latest | grep "browser_download_url" | awk '{print substr($2, 2, length($2)-2) }' | tail -n+2 | head -n 1)
|
||||
VERSION=$(curl -s https://api.github.com/repos/Suwayomi/Suwayomi-Server/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
||||
wget -q $RELEASE
|
||||
URL=$(curl -s https://api.github.com/repos/Suwayomi/Suwayomi-Server/releases/latest | grep "browser_download_url" | awk '{print substr($2, 2, length($2)-2) }' | tail -n+2 | head -n 1)
|
||||
RELEASE=$(curl -s https://api.github.com/repos/Suwayomi/Suwayomi-Server/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
||||
wget -q $URL
|
||||
$STD dpkg -i *.deb
|
||||
rm -f *.deb
|
||||
echo ${VERSION} >/opt/suwayomi-server_version.txt
|
||||
echo ${RELEASE} >/opt/suwayomi-server_version.txt
|
||||
msg_ok "Done setting up Suwayomi-Server"
|
||||
msg_info "Creating Service"
|
||||
cat <<EOF >/etc/systemd/system/suwayomi-server.service
|
||||
|
Loading…
Reference in New Issue
Block a user