Compare commits
No commits in common. "3344157d6b665274984a4f6c57e3b6a75409058e" and "3fe3fc9a5cc581e98120d2b11c4a8d5f7fb149e7" have entirely different histories.
3344157d6b
...
3fe3fc9a5c
|
@ -123,7 +123,7 @@ do
|
|||
mkdir -p $component_dir/etc
|
||||
cp $component_dir/repo/.env $component_dir/etc/
|
||||
cp $component_dir/repo/env.json $component_dir/etc/
|
||||
chown 82:82 $component_dir/etc/
|
||||
mkdir -p $component_dir/etc/
|
||||
mkdir -p $component_dir/bin/
|
||||
cp $CONFIGS_DIR/provision_ogcore.sh $component_dir/bin/
|
||||
chmod 755 $component_dir/bin/provision_ogcore.sh
|
||||
|
|
|
@ -3,8 +3,14 @@
|
|||
set -x
|
||||
|
||||
CONF_DIR=/opt/opengnsys/ogCore/etc/
|
||||
cd /opt/opengnsys/ogCore/repo/ || exit
|
||||
cd /opt/opengnsys/ogCore/repo/
|
||||
|
||||
# Preparar el fichero .yaml
|
||||
# CONF_DIR=/opt/opengnsys/ogCore/etc/
|
||||
# mkdir -p $CONF_DIR
|
||||
|
||||
# Copiar el fichero de configuración a CONF_DIR
|
||||
# cp docker-compose-deploy.yml $CONF_DIR/
|
||||
|
||||
if [ -f /opt/opengnsys/ogCore/installer/.deployed ]; then
|
||||
echo "ogCore ya instalado"
|
||||
|
@ -42,6 +48,5 @@ curl -k -L --location 'https://localhost:8443/users' \
|
|||
--header "Authorization: Bearer $bearer" \
|
||||
--data "{ \"username\": \"$adminuser\", \"password\": \"$adminpass\", \"roles\": [\"ROLE_SUPER_ADMIN\"] }"
|
||||
|
||||
|
||||
touch /opt/opengnsys/ogCore/installer/.deployed
|
||||
exit 0
|
||||
|
|
|
@ -37,20 +37,10 @@ add_user_ogrepository() {
|
|||
echo "User ogrepository does not exist, creating it"
|
||||
useradd -m -d $OGUSER_HOME -r -s /bin/bash $OGUSER
|
||||
fi
|
||||
if [ ! -d $OGUSER_HOME/.ssh ] ; then
|
||||
mkdir -p $OGUSER_HOME/.ssh
|
||||
cp ssh-keys/opengnsys $OGUSER_HOME/.ssh/id_ed25519
|
||||
cp ssh-keys/opengnsys.pub $OGUSER_HOME/.ssh/id_ed25519.pub
|
||||
cat ssh-keys/opengnsys.pub >> $OGUSER_HOME/.ssh/authorized_keys
|
||||
chown -R $OGUSER:$OGUSER $OGUSER_HOME/.ssh
|
||||
chmod 0600 $OGUSER_HOME/.ssh/*
|
||||
|
||||
fi
|
||||
if [ ! -f /etc/sudoers.d/$OGUSER ]; then
|
||||
echo "User $OGUSER does not have sudo permissions, adding it"
|
||||
echo "$OGUSER ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/"$OGUSER"
|
||||
fi
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue