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_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/