Skip to content
This repository has been archived by the owner on Nov 2, 2024. It is now read-only.

Commit

Permalink
Mafl Dashboard update script (#2657)
Browse files Browse the repository at this point in the history
  • Loading branch information
hywax authored Mar 14, 2024
1 parent 58b75e0 commit 019a80d
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion ct/mafl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,19 @@ function default_settings() {
function update_script() {
header_info
if [[ ! -d /opt/mafl ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
msg_error "There is currently no update path available."

RELEASE=$(curl -s https://api.github.com/repos/hywax/mafl/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
msg_info "Updating Mafl to v${RELEASE} (Patience)"
systemctl stop mafl
wget -q https://github.com/hywax/mafl/archive/refs/tags/v${RELEASE}.tar.gz
tar -xzf v${RELEASE}.tar.gz
cp -r mafl-${RELEASE}/* /opt/mafl/
rm -rf mafl-${RELEASE}
cd /opt/mafl
yarn install
yarn build
systemctl start mafl
msg_ok "Updated Mafl to v${RELEASE}"
exit
}

Expand Down

0 comments on commit 019a80d

Please sign in to comment.