From e7a9bc04c683c072829498bf051a58a577f1698a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Slavi=C5=A1a=20Are=C5=BEina?= <58952836+tremor021@users.noreply.github.com> Date: Wed, 1 Oct 2025 15:44:13 +0200 Subject: [PATCH] Update guardian-install.sh --- install/guardian-install.sh | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/install/guardian-install.sh b/install/guardian-install.sh index 6b3766ee..b982bf3c 100644 --- a/install/guardian-install.sh +++ b/install/guardian-install.sh @@ -14,31 +14,28 @@ network_check update_os msg_info "Installing Dependencies" -$STD apt install -y \ - sqlite3 -NODE_VERSION="24" setup_nodejs +$STD apt install -y sqlite3 msg_ok "Installed Dependencies" -msg_info "Setup Guardian" +NODE_VERSION="24" setup_nodejs fetch_and_deploy_gh_release "guardian" "HydroshieldMKII/Guardian" "tarball" "latest" "/opt/guardian" - -msg_info "Building App" +msg_info "Configuring ${APPLICATION}" cd /opt/guardian/backend $STD npm ci $STD npm run build - cd /opt/guardian/frontend $STD npm ci export DEPLOYMENT_MODE=standalone $STD npm run build -msg_ok "Built App" +msg_ok "Configured {APPLICATION}" -msg_info "Creating Services" +msg_info "Creating Service" cat </etc/systemd/system/guardian-backend.service [Unit] Description=Guardian Backend After=network.target + [Service] WorkingDirectory=/opt/guardian/backend ExecStart=/usr/bin/node dist/main.js @@ -53,6 +50,7 @@ cat </etc/systemd/system/guardian-frontend.service Description=Guardian Frontend After=guardian-backend.service network.target Wants=guardian-backend.service + [Service] WorkingDirectory=/opt/guardian/frontend Environment=DEPLOYMENT_MODE=standalone @@ -65,9 +63,10 @@ EOF systemctl enable -q --now guardian-backend systemctl enable -q --now guardian-frontend -msg_ok "Created Services" +msg_ok "Created Service" motd_ssh +customize apt -y autoremove apt -y autoclean