From dc6c21a85f5f6917fb6f2f90392fa4d260914116 Mon Sep 17 00:00:00 2001 From: tteckster Date: Tue, 23 Apr 2024 10:34:50 -0400 Subject: [PATCH] Update homepage-install.sh Refactor --- install/homepage-install.sh | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/install/homepage-install.sh b/install/homepage-install.sh index 7e7dc650..8d2bf340 100644 --- a/install/homepage-install.sh +++ b/install/homepage-install.sh @@ -17,11 +17,7 @@ msg_info "Installing Dependencies" $STD apt-get install -y curl $STD apt-get install -y sudo $STD apt-get install -y mc -$STD apt-get install -y make -$STD apt-get install -y g++ -$STD apt-get install -y gcc -$STD apt-get install -y ca-certificates -$STD apt-get install -y gnupg +$STD apt-get install -y gpg msg_ok "Installed Dependencies" msg_info "Setting up Node.js Repository" @@ -47,11 +43,12 @@ cd /opt/homepage cp /opt/homepage/src/skeleton/* /opt/homepage/config $STD pnpm install $STD pnpm build +echo "${RELEASE}" >/opt/${APPLICATION}_version.txt msg_ok "Installed Homepage v${RELEASE}" msg_info "Creating Service" -service_path="/etc/systemd/system/homepage.service" -echo "[Unit] +cat </etc/systemd/system/homepage.service +[Unit] Description=Homepage After=network.target StartLimitIntervalSec=0 @@ -63,8 +60,9 @@ User=root WorkingDirectory=/opt/homepage/ ExecStart=pnpm start [Install] -WantedBy=multi-user.target" >$service_path -$STD systemctl enable --now homepage +WantedBy=multi-user.target +EOF +systemctl enable -q --now homepage msg_ok "Created Service" motd_ssh