Compare commits
4 Commits
3fe3fc9a5c
...
3344157d6b
Author | SHA1 | Date |
---|---|---|
|
3344157d6b | |
|
22650060af | |
|
4634061f41 | |
|
20a338a0d6 |
|
@ -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/
|
||||
mkdir -p $component_dir/etc/
|
||||
chown 82:82 $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,14 +3,8 @@
|
|||
set -x
|
||||
|
||||
CONF_DIR=/opt/opengnsys/ogCore/etc/
|
||||
cd /opt/opengnsys/ogCore/repo/
|
||||
cd /opt/opengnsys/ogCore/repo/ || exit
|
||||
|
||||
# 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"
|
||||
|
@ -48,5 +42,6 @@ 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,10 +37,20 @@ 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