Minor fixes

This commit is contained in:
Andrej Kocijan 2025-08-22 13:08:15 +02:00
parent 006bbd124c
commit 33df8b7b3a
No known key found for this signature in database
2 changed files with 4 additions and 7 deletions

View File

@ -29,7 +29,7 @@ function update_script() {
fi
RELEASE=$(curl -s https://api.github.com/repos/redlib-org/redlib/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then
if [[ "${RELEASE}" != "$(cat ~/.redlib 2>/dev/null)" ]] || [[ ! -f ~/.redlib ]]; then
msg_info "Updating Alpine Packages"
$STD apk -U upgrade
msg_ok "Updated Alpine Packages"
@ -49,7 +49,7 @@ function update_script() {
$STD rc-service redlib start
msg_ok "Started ${APP} Service"
echo "${RELEASE}" >/opt/${APP}_version.txt
echo "${RELEASE}" >~/.redlib
msg_ok "Update Successful"
else
msg_ok "No update required. ${APP} is already at ${RELEASE}"

View File

@ -23,7 +23,7 @@ msg_info "Installing Redlib"
mkdir /opt/redlib
$STD tar -xzf /tmp/redlib-x86_64-unknown-linux-musl.tar.gz -C /opt/redlib
$STD rm /tmp/redlib-x86_64-unknown-linux-musl.tar.gz
echo "${RELEASE}" >/opt/Redlib_version.txt
echo "${RELEASE}" >~/.redlib
cat <<EOF >/opt/redlib/redlib.conf
############################################
# Redlib Instance Configuration File
@ -91,11 +91,8 @@ start_pre() {
}
EOF
$STD chmod +x /etc/init.d/redlib
msg_ok "Created Redlib Service"
msg_info "Enabling Redlib Service"
$STD rc-update add redlib default
msg_ok "Enabled Redlib Service"
msg_ok "Created Redlib Service"
msg_info "Starting Redlib Service"
$STD rc-service redlib start