Fixes download dir

pull/1/head
Nicolas Arenas 2024-11-11 09:51:50 +01:00
parent 18d7bd4ddf
commit 2e78e3d012
1 changed files with 5 additions and 2 deletions

View File

@ -6,14 +6,15 @@ GIT_BRANCH=$1
GIT_REPO=https://ognproject.evlt.uma.es/gitea/opengnsys/ogrepository.git GIT_REPO=https://ognproject.evlt.uma.es/gitea/opengnsys/ogrepository.git
GIT_SSL_NO_VERIFY=true GIT_SSL_NO_VERIFY=true
INSTALL_DIR=/opt/opengnsys/ogrepository INSTALL_DIR=/opt/opengnsys/ogrepository
DOWNLOAD_DIR=/tmp/ogrepository
DEBIAN_FRONTEND=noninteractive DEBIAN_FRONTEND=noninteractive
export DEBIAN_FRONTEND export DEBIAN_FRONTEND
export GIT_SSL_NO_VERIFY export GIT_SSL_NO_VERIFY
clone_repository() { clone_repository() {
local BRANCH=$1 local BRANCH=$1
git clone -b "$BRANCH" $GIT_REPO /tmp/ogrepository git clone -b "$BRANCH" $GIT_REPO $DOWNLOAD_DIR
chown -R ogrepository:ogrepository /tmp/ogrepository chown -R ogrepository:ogrepository $DOWNLOAD_DIR
} }
check_root() { check_root() {
@ -48,12 +49,14 @@ install_external_packages() {
} }
install_ogrepo-api_service() { install_ogrepo-api_service() {
cd $DOWNLOAD_DIR
cp -r installer/files/ogrepo-api.service /etc/systemd/system/ogrepo-api.service cp -r installer/files/ogrepo-api.service /etc/systemd/system/ogrepo-api.service
systemctl enable --now ogrepo-api systemctl enable --now ogrepo-api
systemctl start ogrepository systemctl start ogrepository
} }
install_files() { install_files() {
cd $DOWNLOAD_DIR
install bin/* /opt/opengnsys/bin/ install bin/* /opt/opengnsys/bin/
install bin/clients/* /opt/opengnsys/bin/clients install bin/clients/* /opt/opengnsys/bin/clients
install etc/* /opt/opengnsys/etc/ install etc/* /opt/opengnsys/etc/