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

Mafl Dashboard update script #2657

Merged
merged 8 commits into from
Mar 14, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Mafl Dashboard change pnpm to yarn
hywax committed Feb 26, 2024
commit 7d755c9ae80c58fd7a399017993dfc16c849a7a8
9 changes: 5 additions & 4 deletions install/mafl-install.sh
Original file line number Diff line number Diff line change
@@ -33,7 +33,8 @@ msg_ok "Set up Node.js Repository"
msg_info "Installing Node.js"
$STD apt-get update
$STD apt-get install -y nodejs
$STD npm install -g pnpm
$STD npm install -g npm@latest
$STD npm install -g yarn
msg_ok "Installed Node.js"

RELEASE=$(curl -s https://api.github.com/repos/hywax/mafl/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
@@ -45,8 +46,8 @@ touch /opt/mafl/data/config.yml
mv mafl-${RELEASE}/* /opt/mafl
rm -rf mafl-${RELEASE}
cd /opt/mafl
$STD pnpm install
$STD pnpm build
$STD yarn install
$STD yarn build
msg_ok "Installed Mafl v${RELEASE}"

msg_info "Creating Service"
@@ -61,7 +62,7 @@ Restart=always
RestartSec=1
User=root
WorkingDirectory=/opt/mafl/
ExecStart=pnpm preview
ExecStart=yarn preview
[Install]
WantedBy=multi-user.target" >$service_path
$STD systemctl enable --now malf