mirror of
https://github.com/tteck/Proxmox.git
synced 2024-12-26 15:01:56 +00:00
Mafl Dashboard update script (#2657)
This commit is contained in:
parent
58b75e0dd8
commit
019a80d7a1
14
ct/mafl.sh
14
ct/mafl.sh
@ -55,7 +55,19 @@ function default_settings() {
|
|||||||
function update_script() {
|
function update_script() {
|
||||||
header_info
|
header_info
|
||||||
if [[ ! -d /opt/mafl ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
|
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
|
exit
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user