APP_ENV='PROD'
%set keyfile = %%getVar('container_path_web','') + '/var/www/html/ninegate/.key'
APP_SECRET='%%pwdreader("",%%keyfile)'
MESSENGER_TRANSPORT_DSN='doctrine://default?auto_setup=0'
PROTOCOLE='https'

DATABASE_NAME='ninegate'
DATABASE_USER='ninegate'
DATABASE_PASSWORD='changeme'
%if %%getVar("nineboard_db_mode", 'non') == "externe"
DATABASE_HOST='%%ninegate_dbserver'
%else if %%getVar("nineboard_db_mode", 'non') == "default"
    %set dbhost = %%getVar('edb_host', 'non')
    %if %%dbhost == 'non' and %%mode_conteneur_actif == 'oui':
DATABASE_HOST='%%adresse_ip_mysql'
    %else
      %if %%dbhost == 'non'
DATABASE_HOST='localhost'
      %else
DATABASE_HOST='localhost'
      %end if
    %end if
%else
DATABASE_HOST='%%adresse_ip_mysql'
%end if

# Determine qui est le maitre de l'identitité =  SQL / LDAP / SSO
# Si SQL cela veut dire que c'est l'applicatif qui gère les utilisateurs
# Sinon la source est externe soit via un annuaire soit via des attributs venant d'un SSO
# Si la source est externe de fait pas de module d'inscription ni de reset de password
# Et pas de synchronisation vers un annuaire
MASTERIDENTITY='%%ninegate_masteridentity'

# Mode d'authentification soit SQL / LDAP / CAS
# Attention si le masteridentity est différent de SQL le mode d'authentification est forcement différent de SQL
# Car aucune synchronisation des password n'est possible
MODE_AUTH='%%ninegate_mode_auth'

# Mode de registration : none / byuser / byadmin
# none = désactivation de l'inscription mais reset de password possible
# byuser = aucune validation par un administrateur, l'utilisateur valide son inscription par lui-même
# byadmin = validation de l'inscription par un administrateur, sauf si domaine de messagerie dans la liste blanche
%if %%getVar("ninegate_masteridentity", 'SQL') == "SQL"
MODEREGISTRATION='%%ninegate_moderegistration'
KEYTERM='%%ninegate_keyterm'                      # Durée de validité du jeton d'inscription
MINPASSWORD=%%ninegate_minpassword              # Taille mini du password
%else
MODEREGISTRATION=none
KEYTERM=8                                       # Durée de validité du jeton d'inscription
MINPASSWORD=8                                   # Taille mini du password
%end if
INITPWDADMIN='%%getVar("ninegate_pwdadmin", "")'  # Mot de passe par défaut du compte admin

# Force theme
%if %%getVar("ninegate_forcetheme", 'non') == "oui"
FORCE_THEME=1
FORCE_THEMENAME="%%ninegate_forcethemename"
%else
FORCE_THEME=0
FORCE_THEMENAME=
%end if

# Activation module
%if %%getVar("ninegate_activate_cron", 'non') == "oui"
CRON_ACTIVATE=1
%else
CRON_ACTIVATE=0
%end if
%if %%getVar("ninegate_activate_syncenvole", 'non') == "oui"
SYNCENVOLE_ACTIVATE=1
%else
SYNCENVOLE_ACTIVATE=0
%end if
%if %%getVar("ninegate_activate_websocket", 'non') == "oui"
WEBSOCKET_ACTIVATE=1
%else
WEBSOCKET_ACTIVATE=0
%end if
%if %%getVar("ninegate_activate_portal", 'non') == "oui"
PORTAL_ACTIVATE=1
MODULE_ACTIVATE=0
PAGE_ACTIVATE=0
ITEM_ACTIVATE=0
ALERT_ACTIVATE=0
CALENDAR_ACTIVATE=0
BLOG_ACTIVATE=0
PROJECT_ACTIVATE=0
FLUX_ACTIVATE=0
NOTICE_ACTIVATE=0
%else
PORTAL_ACTIVATE=0
%if %%getVar("ninegate_activate_page", 'non') == "oui"
MODULE_ACTIVATE=1
PAGE_ACTIVATE=1
%else
PAGE_ACTIVATE=0
%end if
%if %%getVar("ninegate_activate_item", 'non') == "oui"
MODULE_ACTIVATE=1
ITEM_ACTIVATE=1
%else
ITEM_ACTIVATE=0
%end if
%if %%getVar("ninegate_activate_alert", 'non') == "oui"
MODULE_ACTIVATE=1
ALERT_ACTIVATE=1
%else
ALERT_ACTIVATE=0
%end if
%if %%getVar("ninegate_activate_calendar", 'non') == "oui"
MODULE_ACTIVATE=1
CALENDAR_ACTIVATE=1
%else
CALENDAR_ACTIVATE=0
%end if
%if %%getVar("ninegate_activate_blog", 'non') == "oui"
MODULE_ACTIVATE=1
BLOG_ACTIVATE=1
%else
BLOG_ACTIVATE=0
%end if
%if %%getVar("ninegate_activate_project", 'non') == "oui"
MODULE_ACTIVATE=1
PROJECT_ACTIVATE=1
%else
PROJECT_ACTIVATE=0
%end if
%if %%getVar("ninegate_activate_flux", 'non') == "oui"
MODULE_ACTIVATE=1
FLUX_ACTIVATE=1
%else
FLUX_ACTIVATE=0
%end if
%if %%getVar("ninegate_activate_notice", 'non') == "oui"
MODULE_ACTIVATE=1
NOTICE_ACTIVATE=1
%else
NOTICE_ACTIVATE=0
%end if
%end if


# Information de base de l'annuaire
LDAP_TYPE='%%getVar("ninegate_ldaptype", 'LDAP')'
LDAP_HOST='ldap://%%adresse_ip_ldap'
LDAP_PORT=%%ldap_port
%if %%getVar("ldap_tls","non") == "oui"
LDAP_TLS=1
%else
LDAP_TLS=0
%end if
%if %%getVar("ninegate_masteridentity", 'SQL') != "SQL"
LDAP_USER='%%ldap_reader'
LDAP_PASSWORD='%%pwdreader("",%%ldap_reader_passfile)'
%else
%if %%getVar("activer_admin_passfile", 'non') == "oui"
%if %%getVar("ldap_writer", '') == ""
LDAP_USER='cn=admin,o=gouv,c=fr'
%else
LDAP_USER='%%ldap_writer'
%end if
LDAP_PASSWORD='%%pwdreader("",%%ldap_admin_passfile)'
%else
LDAP_USER='%%ldap_reader'
LDAP_PASSWORD='%%pwdreader("",%%ldap_reader_passfile)'
%end if
%end if
LDAP_BASEDN='%%ldap_base_dn'
%if %%getVar("ninegate_ldaptype", 'LDAP') == "AD"
LDAP_ADDOMAINEHOME='%%ninegate_addomainehome'
%if %%ninegate_addomaineprofil
LDAP_ADDOMAINEPROFIL='%%ninegate_addomaineprofil'
%else
LDAP_ADDOMAINEPROFIL=
%end if
%else
LDAP_ADDOMAINEHOME=
LDAP_ADDOMAINEPROFIL=
%end if

# Mise en page
WEBURL=%%web_url
ALIAS=ninegate/
LIBELLE_ETAB='%%libelle_etab'
NUMERO_ETAB='%%numero_etab'
COLORMAIN='%%ninegate_colormain'
FONTCOLORHOVER='%%ninegate_fontcolorhover'
LABELNIVEAU01='%%ninegate_niveau01label'
LABELSNIVEAU01='%%ninegate_niveau01labels'
ICONNIVEAU01='%%ninegate_niveau01icon'
LABELSIRENNIVEAU01='SIREN'
%if %%getVar("ninegate_niveau02view", 'non') == "oui"
VIEWNIVEAU02=1
LABELNIVEAU02='%%ninegate_niveau02label'
LABELSNIVEAU02='%%ninegate_niveau02labels'
ICONNIVEAU02='%%ninegate_niveau02icon'
LABELSIRETNIVEAU02='SIRET'
%else
VIEWNIVEAU02=0
LABELNIVEAU02='niveau02'
LABELSNIVEAU02='niveaus02'
ICONNIVEAU02='fa-sitemap'
LABELSIRETNIVEAU02='SIRET'
%end if

# Si masteridentity est à SQL = où sont synchronisées les datas dans l'annuaire
%if %%getVar("ninegate_syncldap", 'non') == "oui"
LDAP_SYNC=1
%else
LDAP_SYNC=0
%end if

%if %%getVar("ninegate_test_conf_ldap", 'non') == "oui"
LDAP_BASEUSER='ou=users,ou=%%ninegate_organization,%%ldap_base_dn'
LDAP_BASENIVEAU01='ou=%%ninegate_niveau01branche,ou=%%ninegate_organization,%%ldap_base_dn'
LDAP_BASENIVEAU02='ou=%%ninegate_niveau02branche,ou=%%ninegate_organization,%%ldap_base_dn'
LDAP_BASEGROUP='ou=groups,ou=%%ninegate_organization,%%ldap_base_dn'
%else if %%getVar("ninegate_ldaptemplate", '') == "open"
    %if not %%is_empty(%%ninegate_openldapsubbranchuser)
LDAP_BASEUSER='%%ninegate_openldapsubbranchuser'
    %else
LDAP_BASEUSER='%%ldap_base_dn'
    %end if
LDAP_BASENIVEAU01='%%ldap_base_dn'
LDAP_BASENIVEAU02='%%ldap_base_dn'
    %if not %%is_empty(%%ninegate_openldapsubbranchgroup)
LDAP_BASEGROUP='%%ninegate_openldapsubbranchgroup'
    %else
LDAP_BASEGROUP='%%ldap_base_dn'
    %end if
%else
LDAP_BASEUSER='%%ldap_base_dn'
LDAP_BASENIVEAU01='%%ldap_base_dn'
LDAP_BASENIVEAU02='%%ldap_base_dn'
LDAP_BASEGROUP='%%ldap_base_dn'
%end if

# Si masteridentity est à LDAP = quel est le modele d'organisation
# Si open   = rien de particulier
# Si scribe = on génére des groupes correspondant au profil / classe / niveau / option
%if %%getVar("ninegate_masteridentity", 'non') == "LDAP"
LDAP_TEMPLATE='%%ninegate_ldaptemplate'
%else
LDAP_TEMPLATE=open
%end if

# Si masteridentity est à LDAP = quel champs sont à récupérer = faudrait templetiser dans genconfig
LDAP_USERNAME='%%ldap_match_attribute'
LDAP_FIRSTNAME='givenname'
LDAP_LASTNAME='sn'
LDAP_EMAIL='%%ldap_fill_mail'
LDAP_MEMBER='%%ldap_member_group_attribute'
%if %%getVar("activer_addadmin", 'non') == "oui"
LDAP_USERSADMIN='["admin","%%uid_addadmin"]'
%else
LDAP_USERSADMIN='["admin"]'
%end if


# Template scribe
%if %%getVar("ninegate_scribegroup", 'non') == "oui"
SCRIBE_GROUP=1
%else
SCRIBE_GROUP=0
%end if

%if %%getVar("ninegate_scribemaster", 'non') == "oui"
SCRIBE_MASTER=1
%else
SCRIBE_MASTER=0
%end if

# Template openldap
%if %%getVar("ninegate_ldaptemplate", 'non') == "open"
OPENLDAPREQNIVEAU01='%%ninegate_openldapreqniveau01'
%if %%getVar("ninegate_openldapsynchrogroup", 'non') == "oui"
OPENLDAPSYNCHROGROUP=1
OPENLDAPREQGROUP='%%ninegate_openldapreqgroup'
%else
OPENLDAPSYNCHROGROUP=0
OPENLDAPREQGROUP=
%end if
%else
OPENLDAPREQNIVEAU01=
OPENLDAPSYNCHROGROUP=0
OPENLDAPREQGROUP=
%end if

# Activation Widget
%if %%getVar("ninegate_activate_widadminer", 'non') == "oui"
ACTIVATE_WIDADMINER=1
WIDADMINER_URL='%%ninegate_widadminer_url'
%else
ACTIVATE_WIDADMINER=0
WIDADMINER_URL=
%end if

%if %%getVar("ninegate_activate_widbalado", 'non') == "oui"
ACTIVATE_WIDBALADO=1
WIDBALADO_URL='%%ninegate_widbalado_url'
%if %%getVar("poshprofil_typesynchro", "") == "ENT"
WIDBALADO_ACTIVATE_SYNCENVOLE=1
WIDBALADO_SYNCENVOLE='%%ninegate_widbalado_syncenvole'
%else
WIDBALADO_ACTIVATE_SYNCENVOLE=0
WIDBALADO_SYNCENVOLE=
%end if
%else
ACTIVATE_WIDBALADO=0
WIDBALADO_URL=
WIDBALADO_ACTIVATE_SYNCENVOLE=0
WIDBALADO_SYNCENVOLE=
%end if

%if %%getVar("ninegate_activate_widcdt", 'non') == "oui"
ACTIVATE_WIDCDT=1
WIDCDT_URL='%%ninegate_widcdt_url'
    %if %%getVar("poshprofil_typesynchro", "") == "ENT"
WIDCDT_ACTIVATE_SYNCENVOLE=1
WIDCDT_SYNCENVOLE='%%ninegate_widcdt_syncenvole'
    %else
WIDCDT_ACTIVATE_SYNCENVOLE=0
WIDCDT_SYNCENVOLE=
    %end if
%else
ACTIVATE_WIDCDT=0
WIDCDT_URL=
WIDCDT_ACTIVATE_SYNCENVOLE=0
WIDCDT_SYNCENVOLE=
%end if

%if %%getVar("ninegate_activate_widdokuwiki", 'non') == "oui"
ACTIVATE_WIDDOKUWIKI=1
WIDDOKUWIKI_URL='%%ninegate_widdokuwiki_url'
%else
ACTIVATE_WIDDOKUWIKI=0
WIDDOKUWIKI_URL=
%end if

%if %%getVar("ninegate_activate_wideconnect", 'non') == "oui"
ACTIVATE_WIDECONNECT=1
WIDECONNECT_URL='%%ninegate_wideconnect_url'
%else
ACTIVATE_WIDECONNECT=0
WIDECONNECT_URL=
%end if

%if %%getVar("ninegate_activate_widead", 'non') == "oui"
ACTIVATE_WIDEAD=1
    %if %%getVar("activer_ead_reverseproxy", 'non') == "oui"
WIDEAD_URL='https://%%web_url:%%port_ead_reverseproxy/connect/?server=1'
    %else
WIDEAD_URL='https://%%web_url:4200/connect/?server=1'
    %end if
%else
ACTIVATE_WIDEAD=0
WIDEAD_URL=
%end if

%if %%getVar("ninegate_activate_wideoe", 'non') == "oui"
ACTIVATE_WIDEOE=1
WIDEOE_URL='%%ninegate_wideoe_url'
%else
ACTIVATE_WIDEOE=0
WIDEOE_URL=
%end if

%if %%getVar("ninegate_activate_wideop", 'non') == "oui"
ACTIVATE_WIDEOP=1
WIDEOP_URL='%%ninegate_wideop_url'
%else
ACTIVATE_WIDEOP=0
WIDEOP_URL=
%end if

%if %%getVar("ninegate_activate_widetherhome", 'non') == "oui"
ACTIVATE_WIDETHERHOME=1
WIDETHERHOME_URL='%%ninegate_widetherhome_url'
%else
ACTIVATE_WIDETHERHOME=0
WIDETHERHOME_URL=
%end if

%if %%getVar("ninegate_activate_widfluxbb", 'non') == "oui"
ACTIVATE_WIDFLUXBB=1
WIDFLUXBB_URL='%%ninegate_widfluxbb_url'
%else
ACTIVATE_WIDFLUXBB=0
WIDFLUXBB_URL=
%end if

%if %%getVar("ninegate_activate_widgenconfig", 'non') == "oui"
ACTIVATE_WIDGENCONFIG=1
WIDGENCONFIG_URL='%%ninegate_widgenconfig_url'
%else
ACTIVATE_WIDGENCONFIG=0
WIDGENCONFIG_URL=
%end if

%if %%getVar("ninegate_activate_widgepi", 'non') == "oui"
ACTIVATE_WIDGEPI=1
WIDGEPI_URL='%%ninegate_widgepi_url'
%if %%getVar("poshprofil_typesynchro", "") == "ENT"
WIDGEPI_ACTIVATE_SYNCENVOLE=0
WIDGEPI_SYNCENVOLE='%%ninegate_widgepi_syncenvole'
    %else
WIDGEPI_ACTIVATE_SYNCENVOLE=0
WIDGEPI_SYNCENVOLE=
    %end if
%else
ACTIVATE_WIDGEPI=0
WIDGEPI_URL=
WIDGEPI_ACTIVATE_SYNCENVOLE=0
WIDGEPI_SYNCENVOLE=
%end if


%if %%getVar("ninegate_activate_widglpi", 'non') == "oui"
ACTIVATE_WIDGLPI=1
WIDGLPI_URL='%%ninegate_widglpi_url'
%else
ACTIVATE_WIDGLPI=0
WIDGLPI_URL=
%end if

%if %%getVar("ninegate_activate_widgrr", 'non') == "oui"
ACTIVATE_WIDGRR=1
WIDGRR_URL='%%ninegate_widgrr_url'
%else
ACTIVATE_WIDGRR=0
WIDGRR_URL=
%end if

%if %%getVar("ninegate_activate_widkanboard", 'non') == "oui"
ACTIVATE_WIDKANBOARD=1
WIDKANBOARD_URL='%%ninegate_widkanboard_url'
%else
ACTIVATE_WIDKANBOARD=0
WIDKANBOARD_URL=
%end if

%if %%getVar("ninegate_activate_widlimesurvey", 'non') == "oui"
ACTIVATE_WIDLIMESURVEY=1
WIDLIMESURVEY_URL='%%ninegate_widlimesurvey_url'
WIDLIMESURVEY_APIUSER='%%ninegate_widlimesurvey_apiuser'
WIDLIMESURVEY_APIKEY='%%ninegate_widlimesurvey_apikey'
WIDLIMESURVEY_ACTIVATE_SYNCENVOLE=1
WIDLIMESURVEY_SYNCENVOLE='%%ninegate_widlimesurvey_syncenvole'
%else
ACTIVATE_WIDLIMESURVEY=0
WIDLIMESURVEY_URL=
WIDLIMESURVEY_APIUSER=
WIDLIMESURVEY_ACTIVATE_SYNCENVOLE=0
WIDLIMESURVEY_SYNCENVOLE=
%end if

%if %%getVar("ninegate_activate_widmindmaps", 'non') == "oui"
ACTIVATE_WIDMINDMAPS=1
WIDMINDMAPS_URL='%%ninegate_widmindmaps_url'
%else
ACTIVATE_WIDMINDMAPS=0
WIDMINDMAPS_URL=
%end if

%if %%getVar("ninegate_activate_widmoodle", 'non') == "oui"
ACTIVATE_WIDMOODLE=1
WIDMOODLE_URL='%%ninegate_widmoodle_url'
WIDMOODLE_APIKEY='%%ninegate_widmoodle_apikey'
WIDMOODLE_ACTIVATE_SYNCENVOLE=1
WIDMOODLE_SYNCENVOLE='%%ninegate_widmoodle_syncenvole'
%else
ACTIVATE_WIDMOODLE=0
WIDMOODLE_URL=
WIDMOODLE_APIKEY=
WIDMOODLE_ACTIVATE_SYNCENVOLE=0
WIDMOODLE_SYNCENVOLE=
%end if

%if %%getVar("ninegate_activate_widnextcloud", 'non') == "oui"
ACTIVATE_WIDNEXTCLOUD=1
WIDNEXTCLOUD_URL='%%ninegate_widnextcloud_url'
%if %%getVar("poshprofil_typesynchro", "") == "ENT"
WIDNEXTCLOUD_ACTIVATE_SYNCENVOLE=1
WIDNEXTCLOUD_SYNCENVOLE='%%ninegate_widnextcloud_syncenvole'
%else
WIDNEXTCLOUD_ACTIVATE_SYNCENVOLE=0
WIDNEXTCLOUD_SYNCENVOLE=
%end if
%else
ACTIVATE_WIDNEXTCLOUD=0
WIDNEXTCLOUD_URL=
WIDNEXTCLOUD_ACTIVATE_SYNCENVOLE=0
WIDNEXTCLOUD_SYNCENVOLE=
%end if

%if %%getVar("ninegate_activate_widnineboard", 'non') == "oui"
ACTIVATE_WIDNINEBOARD=1
WIDNINEBOARD_URL='%%ninegate_widnineboard_url'
%else
ACTIVATE_WIDNINEBOARD=0
WIDNINEBOARD_URL=
%end if

%if %%getVar("ninegate_activate_widnineschool", 'non') == "oui"
ACTIVATE_WIDNINESCHOOL=1
WIDNINESCHOOL='%%ninegate_widnineschool_url'
%else
ACTIVATE_WIDNINESCHOOL=0
WIDNINESCHOOL=
%end if

%if %%getVar("ninegate_activate_widninesurvey", 'non') == "oui"
ACTIVATE_WIDNINESURVEY=1
WIDNINESURVEY_URL='%%ninegate_widninesurvey_url'
%else
ACTIVATE_WIDNINESURVEY=0
WIDNINESURVEY_URL=
%end if

%if %%getVar("ninegate_activate_widonlyoffice", 'non') == "oui"
ACTIVATE_WIDONLYOFFICE=1
WIDONLYOFFICE_URL='%%ninegate_widonlyoffice_url'
%if %%getVar("ninegate_widonlyoffice_sync", 'non') == "oui"
WIDONLYOFFICE_SYNC=1
WIDONLYOFFICE_USER='%%ninegate_widonlyoffice_user'
WIDONLYOFFICE_PASSWORD='%%ninegate_widonlyoffice_password'
%else
WIDONLYOFFICE_SYNC=0
WIDONLYOFFICE_USER=
WIDONLYOFFICE_PASSWORD=
%end if
%else
ACTIVATE_WIDONLYOFFICE=0
WIDONLYOFFICE_SYNC=0
WIDONLYOFFICE_URL=
WIDONLYOFFICE_USER=
WIDONLYOFFICE_PASSWORD=
%end if

%if %%getVar("ninegate_activate_widopensondage", 'non') == "oui"
ACTIVATE_WIDOPENSONDAGE=1
WIDOPENSONDAGE_URL='%%ninegate_widopensondage_url'
%else
ACTIVATE_WIDOPENSONDAGE=0
WIDOPENSONDAGE_URL=
%end if

%if %%getVar("ninegate_activate_widphpldapadmin", 'non') == "oui"
ACTIVATE_WIDPHPLDAPADMIN=1
WIDPIWIGO_URL='%%ninegate_widphpldapadmin_url'
%else
ACTIVATE_WIDPHPLDAPADMIN=0
WIDPIWIGO_URL=
%end if

%if %%getVar("ninegate_activate_widpiwigo", 'non') == "oui"
ACTIVATE_WIDPIWIGO=1
WIDPIWIGO_URL='%%ninegate_widpiwigo_url'
%else
ACTIVATE_WIDPIWIGO=0
WIDPIWIGO_URL=
%end if

%if %%getVar("ninegate_activate_widpiwik", 'non') == "oui"
ACTIVATE_WIDPIWIK=1
WIDPIWIK_URL='%%ninegate_widpiwik_url'
%if %%getVar("poshprofil_typesynchro", "") == "Annuaire"
WIDPIWIK_ACTIVATE_SYNCENVOLE=1
WIDPIWIK_SYNCENVOLE='%%ninegate_widpiwik_syncenvole'
%else
WIDPIWIK_ACTIVATE_SYNCENVOLE=0
WIDPIWIK_SYNCENVOLE=
%end if
%else
ACTIVATE_WIDPIWIK=0
WIDPIWIK_URL=
WIDPIWIK_ACTIVATE_SYNCENVOLE=0
WIDPIWIK_SYNCENVOLE=
%end if


%if %%getVar("ninegate_activate_widroundcube", 'non') == "oui"
ACTIVATE_WIDROUNDCUBE=1
WIDROUNDCUBE_URL='%%ninegate_widroundcube_url'
%else
ACTIVATE_WIDROUNDCUBE=0
WIDROUNDCUBE_URL=
%end if

%if %%getVar("ninegate_activate_widsacoche", 'non') == "oui"
ACTIVATE_WIDSACOCHE=1
WIDSACOCHE_URL='%%ninegate_widsacoche_url'
%if %%getVar("poshprofil_typesynchro", "") == "ENT"
WIDSACOCHE_ACTIVATE_SYNCENVOLE=1
WIDSACOCHE_SYNCENVOLE='%%ninegate_widsacoche_syncenvole'
%else
WIDSACOCHE_ACTIVATE_SYNCENVOLE=0
WIDSACOCHE_SYNCENVOLE=
%end if
%else
ACTIVATE_WIDSACOCHE=0
WIDSACOCHE_URL=
WIDSACOCHE_ACTIVATE_SYNCENVOLE=0
WIDSACOCHE_SYNCENVOLE=
%end if

%if %%getVar("ninegate_activate_widwordpress", 'non') == "oui"
ACTIVATE_WIDWORDPRESS=1
WIDWORDPRESS_URL='%%ninegate_widwordpress_url'
WIDWORDPRESS_ACTIVATE_SYNCENVOLE=1
WIDWORDPRESS_SYNCENVOLE='%%ninegate_widwordpress_syncenvole'
%else
ACTIVATE_WIDWORDPRESS=0
WIDWORDPRESS_URL=
WIDWORDPRESS_ACTIVATE_SYNCENVOLE=
WIDWORDPRESS_SYNCENVOLE=
%end if

%if %%getVar("activer_sonde", 'non') == "oui"
ACTIVATE_WIDSONDE=1
WIDSONDE_URL='/sondepiwik/sonde.js'
%else
ACTIVATE_WIDSONDE=0
WIDSONDE_URL=
%end if

# Si mode_auth = CAS
%if %%getVar("eolesso_adresse", '') == ""
CAS_HOST=
CAS_PATH=
CAS_PORT=
CAS_TYPE=
%else
CAS_HOST='%%eolesso_adresse'
CAS_PATH='%%getVar("eolesso_cas_folder", '')'
CAS_PORT=%%eolesso_port
CAS_TYPE='%%getVar("ninegate_typesso", 'client')'
%end if

# Si mode_auth = CAS les attributs permettant de matché avec les utilisateurs
USER_ATTR_CAS_USERNAME='username'
USER_ATTR_CAS_MAIL=email
USER_ATTR_CAS_LASTNAME='lastname'
USER_ATTR_CAS_FIRSTNAME='firstname'

%if %%getVar("ninegate_ssosynchrogroup", 'non') == "oui"
SSOSYNCHROGROUP=1
USER_ATTR_CAS_GROUP='%%ninegate_ssoreqgroup'
%else
SSOSYNCHROGROUP=0
USER_ATTR_CAS_GROUP=
%end if

%if %%getVar("ninegate_ssosynchroitem", 'non') == "oui"
SSOSYNCHROITEM=1
USER_ATTR_CAS_ITEM='%%ninegate_ssoreqitem'
%else
SSOSYNCHROITEM=0
USER_ATTR_CAS_ITEM=
%end if

# Mailler
%if %%getVar("ninegate_activer_localmail", 'non') == "oui"
MAILER_DSN='sendmail://default?command=/usr/sbin/sendmail%20-oi%20-t'
%else
MAILER_DSN='%%ninegate_maildsn'
%end if
NOREPLY='%%ninegate_noreply'
%if %%is_defined('adresse_imap') or %%is_defined('adresse_ip_mail')
ACTIVE_IMAPUNREAD=1
%if %%is_defined('adresse_imap')
IMAPUNDREAD_IP='%%adresse_imap'
%else
IMAPUNDREAD_IP='%%adresse_ip_mail'
%end if
%else
ACTIVE_IMAPUNREAD=0
IMAPUNDREAD_IP=
%end if

# Websocket
WSS_PORT=5556

# Proxy
%if %%activer_proxy_client == 'oui'
PROXY_USE=1
PROXY_HOST='%%proxy_client_adresse'
PROXY_PORT='%%proxy_client_port'
%else
PROXY_USE=0
PROXY_HOST=
PROXY_PORT=
%end if

# Lock
LOCK_DSN=flock
