From 5d7c2d2c555bad04d8a49bc247a8bd84c7380c13 Mon Sep 17 00:00:00 2001 From: tteckster Date: Mon, 26 Feb 2024 06:08:42 -0500 Subject: [PATCH] Update mafl-install.sh --- install/mafl-install.sh | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/install/mafl-install.sh b/install/mafl-install.sh index 353765f2..63f30288 100644 --- a/install/mafl-install.sh +++ b/install/mafl-install.sh @@ -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) }') msg_info "Installing Mafl v${RELEASE}" 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 -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 rm -rf mafl-${RELEASE} cd /opt/mafl +export NUXT_TELEMETRY_DISABLED=true $STD yarn install $STD yarn build msg_ok "Installed Mafl v${RELEASE}" msg_info "Creating Service" -service_path="/etc/systemd/system/mafl.service" -echo "[Unit] +cat </etc/systemd/system/mafl.service +[Unit] Description=Mafl After=network.target StartLimitIntervalSec=0 + [Service] Type=simple Restart=always @@ -63,9 +65,11 @@ RestartSec=1 User=root WorkingDirectory=/opt/mafl/ ExecStart=yarn preview + [Install] -WantedBy=multi-user.target" >$service_path -$STD systemctl enable --now malf +WantedBy=multi-user.target +EOF +systemctl enable -q --now mafl msg_ok "Created Service" motd_ssh