svg
This commit is contained in:
@ -1,12 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
group=$2
|
||||
if [ -z $group ]
|
||||
then
|
||||
group=$1
|
||||
fi
|
||||
|
||||
sudo chown $1:$group /var/www/html/cadolesuser -R
|
||||
sudo chmod +w /var/www/html/cadolesuser -R
|
||||
sudo chmod g+rw /var/www/html/cadolesuser -R
|
||||
|
@ -1,4 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
cd /var/www/html/cadolesuser
|
||||
php bin/console Cron:Exec
|
@ -1,73 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
activer_eportail=$(CreoleGet activer_eportail non)
|
||||
moderegistration=$(CreoleGet cadolesuser_moderegistration none)
|
||||
labelsniveau01=$(CreoleGet cadolesuser_niveau01labels non)
|
||||
iconniveau01=$(CreoleGet cadolesuser_niveau01icon non)
|
||||
affniveau02=$(CreoleGet cadolesuser_niveau02view non)
|
||||
labelsniveau02=$(CreoleGet cadolesuser_niveau02labels non)
|
||||
iconniveau02=$(CreoleGet cadolesuser_niveau02icon non)
|
||||
|
||||
www_dir="$container_path_web/var/www/html"
|
||||
eportail_dir="$www_dir/eportail"
|
||||
|
||||
# Installation des dépendances composer
|
||||
composer install
|
||||
|
||||
# Permissions
|
||||
./perm.sh www-data
|
||||
|
||||
# Nettoyage du cache
|
||||
php bin/console cache:clear --env=prod --no-debug
|
||||
|
||||
# Migration si nécessaire du schéma de la base
|
||||
php bin/console doctrine:schema:update --force --env=prod --no-debug
|
||||
|
||||
# Insertion data de base
|
||||
php bin/console Core:InitData
|
||||
php bin/console Cron:InitData
|
||||
php bin/console Portal:InitData
|
||||
|
||||
# Generation des assets
|
||||
bin/console --env=dev assetic:dump
|
||||
|
||||
# Copie des polices du projet dans le rep web
|
||||
cp -rf src/Cadoles/CoreBundle/Resources/public/fonts web/
|
||||
|
||||
# Pointer le repertoire des avatar d'eportail sur celui de draaf
|
||||
# Paramétrage eportail
|
||||
if [[ "$activer_eportail" = 'oui' ]]
|
||||
then
|
||||
if [[ ! -L /var/www/html/eportail/local/images/avatar ]]
|
||||
then
|
||||
rm -rf /var/www/html/eportail/local/images/avatar
|
||||
ln -s /var/www/html/cadolesuser/web/uploads/avatar /var/www/html/eportail/local/images/avatar
|
||||
fi
|
||||
fi
|
||||
|
||||
# Permissions
|
||||
./perm.sh www-data
|
||||
|
||||
# Paramétrage eportail
|
||||
if [[ "$activer_eportail" = 'oui' ]]
|
||||
then
|
||||
echo "<?" > $eportail_dir/local/config/externe.php
|
||||
echo "\$config['modeUserExterne'] = 'true';" >> $eportail_dir/local/config/externe.php
|
||||
echo "\$config['affResgistrationExterne'] = '$moderegistration';" >> $eportail_dir/local/config/externe.php
|
||||
echo "\$config['urlRegistrationExterne'] = '/cadolesuser/registration';" >> $eportail_dir/local/config/externe.php
|
||||
echo "\$config['urlConfigRegistrationExterne'] = '/cadolesuser/config/registration';" >> $eportail_dir/local/config/externe.php
|
||||
echo "\$config['urlWhitelistExterne'] = '/cadolesuser/config/whitelist';" >> $eportail_dir/local/config/externe.php
|
||||
echo "\$config['urlNiveau01Externe'] = '/cadolesuser/config/niveau01';" >> $eportail_dir/local/config/externe.php
|
||||
echo "\$config['labNiveau01Externe'] = '$labelsniveau01';" >> $eportail_dir/local/config/externe.php
|
||||
echo "\$config['icoNiveau01Externe'] = '$iconniveau01';" >> $eportail_dir/local/config/externe.php
|
||||
echo "\$config['affNiveau02Externe'] = '$affniveau02';" >> $eportail_dir/local/config/externe.php
|
||||
echo "\$config['urlNiveau02Externe'] = '/cadolesuser/config/niveau02';" >> $eportail_dir/local/config/externe.php
|
||||
echo "\$config['labNiveau02Externe'] = '$labelsniveau02';" >> $eportail_dir/local/config/externe.php
|
||||
echo "\$config['icoNiveau02Externe'] = '$iconniveau02';" >> $eportail_dir/local/config/externe.php
|
||||
echo "\$config['urlGroupeExterne'] = '/cadolesuser/config/group';" >> $eportail_dir/local/config/externe.php
|
||||
echo "\$config['urlProfilExterne'] = '/cadolesuser/profil';" >> $eportail_dir/local/config/externe.php
|
||||
echo "\$config['urlAnnuaireExterne'] = '/cadolesuser/profil/users';" >> $eportail_dir/local/config/externe.php
|
||||
echo "\$config['urlUserExterne'] = '/cadolesuser/config/user';" >> $eportail_dir/local/config/externe.php
|
||||
echo "\$config['urlLogoutExterne'] = '/cadolesuser/kill?redirect=/eportail/logout.php';" >> $eportail_dir/local/config/externe.php
|
||||
echo "?>" >> $eportail_dir/local/config/externe.php
|
||||
fi
|
12
src/ninegate-1.0/perm.sh
Executable file
12
src/ninegate-1.0/perm.sh
Executable file
@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
group=$2
|
||||
if [ -z $group ]
|
||||
then
|
||||
group=$1
|
||||
fi
|
||||
|
||||
sudo chown $1:$group /var/www/html/ninegate -R
|
||||
sudo chmod +w /var/www/html/ninegate -R
|
||||
sudo chmod g+rw /var/www/html/ninegate -R
|
||||
|
4
src/ninegate-1.0/scripts/ninegate-cron.sh
Executable file
4
src/ninegate-1.0/scripts/ninegate-cron.sh
Executable file
@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
cd /var/www/html/ninegate
|
||||
php bin/console Cron:Exec
|
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
cd /var/www/html/cadolesuser
|
||||
cd /var/www/html/ninegate
|
||||
php bin/console swiftmailer:spool:send --message-limit=100 --env=prod
|
@ -3,6 +3,6 @@
|
||||
export HTTP_PROXY="192.168.57.160:8080"
|
||||
export HTTPS_PROXY="192.168.57.160:8080"
|
||||
|
||||
cd /var/www/html/cadolesuser
|
||||
cd /var/www/html/ninegate
|
||||
|
||||
scripts/cadolesuser-postservice-01.sh
|
||||
scripts/ninegate-postservice-01.sh
|
73
src/ninegate-1.0/scripts/ninegate-postservice-01.sh
Executable file
73
src/ninegate-1.0/scripts/ninegate-postservice-01.sh
Executable file
@ -0,0 +1,73 @@
|
||||
#!/bin/bash
|
||||
|
||||
ninegate_synceportail=$(CreoleGet ninegate_synceportail non)
|
||||
moderegistration=$(CreoleGet ninegate_moderegistration none)
|
||||
labelsniveau01=$(CreoleGet ninegate_niveau01labels non)
|
||||
iconniveau01=$(CreoleGet ninegate_niveau01icon non)
|
||||
affniveau02=$(CreoleGet ninegate_niveau02view non)
|
||||
labelsniveau02=$(CreoleGet ninegate_niveau02labels non)
|
||||
iconniveau02=$(CreoleGet ninegate_niveau02icon non)
|
||||
|
||||
www_dir="$container_path_web/var/www/html"
|
||||
eportail_dir="$www_dir/eportail"
|
||||
|
||||
# Installation des dépendances composer
|
||||
composer install
|
||||
|
||||
# Permissions
|
||||
./perm.sh www-data
|
||||
|
||||
# Nettoyage du cache
|
||||
php bin/console cache:clear --env=prod --no-debug
|
||||
|
||||
# Migration si nécessaire du schéma de la base
|
||||
php bin/console doctrine:schema:update --force --env=prod --no-debug
|
||||
|
||||
# Insertion data de base
|
||||
php bin/console Core:InitData
|
||||
php bin/console Cron:InitData
|
||||
php bin/console Portal:InitData
|
||||
|
||||
# Generation des assets
|
||||
bin/console --env=dev assetic:dump
|
||||
|
||||
# Copie des polices du projet dans le rep web
|
||||
cp -rf src/Cadoles/CoreBundle/Resources/public/fonts web/
|
||||
|
||||
# Pointer le repertoire des avatar d'eportail sur celui de draaf
|
||||
# Paramétrage eportail
|
||||
if [[ "$ninegate_synceportail" = 'oui' ]]
|
||||
then
|
||||
if [[ ! -L /var/www/html/eportail/local/images/avatar ]]
|
||||
then
|
||||
rm -rf /var/www/html/eportail/local/images/avatar
|
||||
ln -s /var/www/html/ninegate/web/uploads/avatar /var/www/html/eportail/local/images/avatar
|
||||
fi
|
||||
fi
|
||||
|
||||
# Permissions
|
||||
./perm.sh www-data
|
||||
|
||||
# Paramétrage eportail
|
||||
if [[ "$ninegate_synceportail" = 'oui' ]]
|
||||
then
|
||||
echo "<?" > $eportail_dir/local/config/externe.php
|
||||
echo "\$config['modeUserExterne'] = 'true';" >> $eportail_dir/local/config/externe.php
|
||||
echo "\$config['affResgistrationExterne'] = '$moderegistration';" >> $eportail_dir/local/config/externe.php
|
||||
echo "\$config['urlRegistrationExterne'] = '/ninegate/registration';" >> $eportail_dir/local/config/externe.php
|
||||
echo "\$config['urlConfigRegistrationExterne'] = '/ninegate/config/registration';" >> $eportail_dir/local/config/externe.php
|
||||
echo "\$config['urlWhitelistExterne'] = '/ninegate/config/whitelist';" >> $eportail_dir/local/config/externe.php
|
||||
echo "\$config['urlNiveau01Externe'] = '/ninegate/config/niveau01';" >> $eportail_dir/local/config/externe.php
|
||||
echo "\$config['labNiveau01Externe'] = '$labelsniveau01';" >> $eportail_dir/local/config/externe.php
|
||||
echo "\$config['icoNiveau01Externe'] = '$iconniveau01';" >> $eportail_dir/local/config/externe.php
|
||||
echo "\$config['affNiveau02Externe'] = '$affniveau02';" >> $eportail_dir/local/config/externe.php
|
||||
echo "\$config['urlNiveau02Externe'] = '/ninegate/config/niveau02';" >> $eportail_dir/local/config/externe.php
|
||||
echo "\$config['labNiveau02Externe'] = '$labelsniveau02';" >> $eportail_dir/local/config/externe.php
|
||||
echo "\$config['icoNiveau02Externe'] = '$iconniveau02';" >> $eportail_dir/local/config/externe.php
|
||||
echo "\$config['urlGroupeExterne'] = '/ninegate/config/group';" >> $eportail_dir/local/config/externe.php
|
||||
echo "\$config['urlProfilExterne'] = '/ninegate/profil';" >> $eportail_dir/local/config/externe.php
|
||||
echo "\$config['urlAnnuaireExterne'] = '/ninegate/profil/users';" >> $eportail_dir/local/config/externe.php
|
||||
echo "\$config['urlUserExterne'] = '/ninegate/config/user';" >> $eportail_dir/local/config/externe.php
|
||||
echo "\$config['urlLogoutExterne'] = '/ninegate/kill?redirect=/eportail/logout.php';" >> $eportail_dir/local/config/externe.php
|
||||
echo "?>" >> $eportail_dir/local/config/externe.php
|
||||
fi
|
@ -35,7 +35,8 @@ class InitDataCommand extends ContainerAwareCommand
|
||||
$output->writeln('CORE = Default Data');
|
||||
|
||||
$em = $this->getContainer()->get('doctrine')->getEntityManager();
|
||||
|
||||
$masteridentity=$this->getContainer()->getParameter('masteridentity');
|
||||
|
||||
$finder = new Finder();
|
||||
$finder->in('src/Cadoles/CoreBundle/Command/data');
|
||||
|
||||
@ -91,6 +92,7 @@ class InitDataCommand extends ContainerAwareCommand
|
||||
$group->setFgopen(false);
|
||||
$group->setFgall(true);
|
||||
$group->setFgtemplate(false);
|
||||
$group->setFgcanshare(false);
|
||||
$em->persist($group);
|
||||
$em->flush();
|
||||
}
|
||||
@ -116,6 +118,18 @@ class InitDataCommand extends ContainerAwareCommand
|
||||
$em->flush();
|
||||
}
|
||||
|
||||
// On s'assure si masteridentity est à LDAP qu'au minimum un niveau01 possède un filtre LDAP
|
||||
if($masteridentity=="LDAP") {
|
||||
$niveau01=$em->createQueryBuilder()->select('n')->from('CadolesCoreBundle:Niveau01','n')->where('n.ldapfilter IS NOT NULL')->getQuery()->getResult();
|
||||
if(!$niveau01) {
|
||||
// Si ce n'est pas le cas on positionne un filtre ultra large sur le niveau01 de base
|
||||
$niveau01=$group=$em->getRepository('CadolesCoreBundle:Niveau01')->find(-100);
|
||||
$niveau01->setLdapfilter("(uid=*)");
|
||||
$em->persist($niveau01);
|
||||
$em->flush();
|
||||
}
|
||||
}
|
||||
|
||||
$output->writeln('');
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user