mirror of https://github.com/tteck/Proxmox.git
Update mafl-install.sh
This commit is contained in:
parent
0f91caa8b5
commit
5d7c2d2c55
|
@ -40,22 +40,24 @@ 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) }')
|
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 "Installing Mafl v${RELEASE}"
|
msg_info "Installing Mafl v${RELEASE}"
|
||||||
wget -q https://github.com/hywax/mafl/archive/refs/tags/v${RELEASE}.tar.gz
|
wget -q https://github.com/hywax/mafl/archive/refs/tags/v${RELEASE}.tar.gz
|
||||||
$STD tar -xzf v${RELEASE}.tar.gz
|
tar -xzf v${RELEASE}.tar.gz
|
||||||
mkdir -p /opt/mafl/data
|
mkdir -p /opt/mafl/data
|
||||||
touch /opt/mafl/data/config.yml
|
wget -q -O /opt/mafl/data/config.yml https://raw.githubusercontent.com/hywax/mafl/main/.example/config.yml
|
||||||
mv mafl-${RELEASE}/* /opt/mafl
|
mv mafl-${RELEASE}/* /opt/mafl
|
||||||
rm -rf mafl-${RELEASE}
|
rm -rf mafl-${RELEASE}
|
||||||
cd /opt/mafl
|
cd /opt/mafl
|
||||||
|
export NUXT_TELEMETRY_DISABLED=true
|
||||||
$STD yarn install
|
$STD yarn install
|
||||||
$STD yarn build
|
$STD yarn build
|
||||||
msg_ok "Installed Mafl v${RELEASE}"
|
msg_ok "Installed Mafl v${RELEASE}"
|
||||||
|
|
||||||
msg_info "Creating Service"
|
msg_info "Creating Service"
|
||||||
service_path="/etc/systemd/system/mafl.service"
|
cat <<EOF >/etc/systemd/system/mafl.service
|
||||||
echo "[Unit]
|
[Unit]
|
||||||
Description=Mafl
|
Description=Mafl
|
||||||
After=network.target
|
After=network.target
|
||||||
StartLimitIntervalSec=0
|
StartLimitIntervalSec=0
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
Restart=always
|
Restart=always
|
||||||
|
@ -63,9 +65,11 @@ RestartSec=1
|
||||||
User=root
|
User=root
|
||||||
WorkingDirectory=/opt/mafl/
|
WorkingDirectory=/opt/mafl/
|
||||||
ExecStart=yarn preview
|
ExecStart=yarn preview
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target" >$service_path
|
WantedBy=multi-user.target
|
||||||
$STD systemctl enable --now malf
|
EOF
|
||||||
|
systemctl enable -q --now mafl
|
||||||
msg_ok "Created Service"
|
msg_ok "Created Service"
|
||||||
|
|
||||||
motd_ssh
|
motd_ssh
|
||||||
|
|
Loading…
Reference in New Issue