From 2e78e3d0124c997674a29a902ae84913a3f91e07 Mon Sep 17 00:00:00 2001 From: Nicolas Arenas Date: Mon, 11 Nov 2024 09:51:50 +0100 Subject: [PATCH] Fixes download dir --- installer/installer.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/installer/installer.sh b/installer/installer.sh index c609cda..53c462e 100644 --- a/installer/installer.sh +++ b/installer/installer.sh @@ -6,14 +6,15 @@ GIT_BRANCH=$1 GIT_REPO=https://ognproject.evlt.uma.es/gitea/opengnsys/ogrepository.git GIT_SSL_NO_VERIFY=true INSTALL_DIR=/opt/opengnsys/ogrepository +DOWNLOAD_DIR=/tmp/ogrepository DEBIAN_FRONTEND=noninteractive export DEBIAN_FRONTEND export GIT_SSL_NO_VERIFY clone_repository() { local BRANCH=$1 - git clone -b "$BRANCH" $GIT_REPO /tmp/ogrepository - chown -R ogrepository:ogrepository /tmp/ogrepository + git clone -b "$BRANCH" $GIT_REPO $DOWNLOAD_DIR + chown -R ogrepository:ogrepository $DOWNLOAD_DIR } check_root() { @@ -48,12 +49,14 @@ install_external_packages() { } install_ogrepo-api_service() { + cd $DOWNLOAD_DIR cp -r installer/files/ogrepo-api.service /etc/systemd/system/ogrepo-api.service systemctl enable --now ogrepo-api systemctl start ogrepository } install_files() { + cd $DOWNLOAD_DIR install bin/* /opt/opengnsys/bin/ install bin/clients/* /opt/opengnsys/bin/clients install etc/* /opt/opengnsys/etc/