Update parameters for ogrepository

working-installer
Nicolas Arenas 2024-11-20 18:29:26 +01:00
parent 033ecb17e7
commit b7c3523b10
2 changed files with 7 additions and 4 deletions

View File

@ -171,12 +171,13 @@ do
git_checkout_release "$OGREPOSITORY_REPO" "$component_dir/repo" "$OGCORE_BRANCH"
cp $CONFIGS_DIR/$config_file $component_dir/installer/config.json
REPO_IP=$(jq -r '.ogrepository_ip' $component_dir/installer/config.json)
CORE_IP=$(jq -r '.ogcore_ip' $component_dir/installer/config.json)
OGUSER=$(jq -r '.ogrepository_samba_user' $component_dir/installer/config.json)
OGPASS=$(jq -r '.ogrepository_samba_pass' $component_dir/installer/config.json)
mkdir -p $component_dir/bin
cp $CONFIGS_DIR/provision_ogrepository.sh $component_dir/bin/
chmod 755 $component_dir/bin/provision_ogrepository.sh
$component_dir/bin/provision_ogrepository.sh $REPO_IP $OGUSER $OGPASS $component_dir/repo
$component_dir/bin/provision_ogrepository.sh $REPO_IP $CORE_IP $OGUSER $OGPASS $component_dir/repo
echo - ogRepository >> /etc/issue
;;
*)

View File

@ -4,10 +4,11 @@ set -e
REPO_IP=${1:-"127.0.0.1"}
OGUSER=${2:-"opengnsys"}
OGPASS=${3:-"og"}
CORE_IP=${2:-"127.0.0.1"}
OGUSER=${3:-"opengnsys"}
OGPASS=${4:-"og"}
INSTALL_DIR=/opt/opengnsys/ogrepository
DOWNLOAD_DIR=${4:-"/tmp/ogrepository"}
DOWNLOAD_DIR=${5:-"/tmp/ogrepository"}
DEBIAN_FRONTEND=noninteractive
export DEBIAN_FRONTEND
export GIT_SSL_NO_VERIFY
@ -75,6 +76,7 @@ install_files() {
chown -R $OGUSER:$OGUSER $INSTALL_DIR
chmod 755 $INSTALL_DIR/bin/*
echo IPlocal="$REPO_IP" > $INSTALL_DIR/etc/ogAdmRepo.cfg
echo IPcore="$CORE_IP" >> $INSTALL_DIR/etc/ogAdmRepo.cfg
sudo chown $OGUSER:$OGUSER $INSTALL_DIR/etc/ogAdmRepo.cfg
}