Minor fixes
This commit is contained in:
parent
006bbd124c
commit
33df8b7b3a
@ -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}"
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user