From 0ab110635b04c69ee39f6957de4d8618c0fc77c3 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 6 May 2025 10:22:03 +0200 Subject: [PATCH] Update fumadocs-install.sh --- install/fumadocs-install.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/install/fumadocs-install.sh b/install/fumadocs-install.sh index 062d7ca..b268f54 100644 --- a/install/fumadocs-install.sh +++ b/install/fumadocs-install.sh @@ -14,34 +14,34 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y \ - ca-certificates \ - expect + ca-certificates msg_ok "Installed Dependencies" NODE_VERSION="22" NODE_MODULE="pnpm@latest" install_node_and_modules msg_info "Installing Fumadocs" -fetch_and_deploy_gh_release fuma-nama/fumadocs export NODE_OPTIONS="--max-old-space-size=4096" +mkdir -p /opt/fumadocs cd /opt/fumadocs -$STD pnpm install -pnpm create fumadocs-app +$STD pnpm create fumadocs-app msg_ok "Installed Fumadocs" msg_info "Creating Service" -cat </etc/systemd/system/fumadocs.service +PROJECT_NAME=$(find . -maxdepth 1 -type d ! -name '.' ! -name '..' | sed 's|^\./||') +cat </etc/systemd/system/fumadocs_$PROJECT_NAME.service [Unit] Description=Fumadocs Documentation Server After=network.target [Service] -WorkingDirectory=/opt/fumadocs +WorkingDirectory=/opt/fumadocs/$PROJECT_NAME ExecStart=/usr/bin/pnpm run dev Restart=always [Install] WantedBy=multi-user.target EOF +systemctl enable -q --now fumadocs_$PROJECT_NAME msg_ok "Created Service" motd_ssh