73 lines
3.6 KiB
Bash
73 lines
3.6 KiB
Bash
|
#!/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
|