premier commit
This commit is contained in:
9
tmpl/ninestat-apache.conf
Normal file
9
tmpl/ninestat-apache.conf
Normal file
@ -0,0 +1,9 @@
|
||||
Alias /ninestat /var/www/html/ninestat/web
|
||||
|
||||
<Directory "/var/www/html/ninestat/web" >
|
||||
AllowOverride All
|
||||
Order Allow,Deny
|
||||
Allow from All
|
||||
Options Indexes FollowSymLinks MultiViews
|
||||
php_admin_flag allow_url_fopen On
|
||||
</Directory>
|
40
tmpl/ninestat-db.yml
Normal file
40
tmpl/ninestat-db.yml
Normal file
@ -0,0 +1,40 @@
|
||||
---
|
||||
%set dmode = %%getVar('ninestat_db_mode','non')
|
||||
%if %%dmode == "externe"
|
||||
dbhost: %%ninestat_dbserver
|
||||
dbport: %%ninestat_dbport
|
||||
dbroot: %%ninestat_dbuser
|
||||
dbrootpwd: %%ninestat_dbpass
|
||||
%else if %%dmode == "local"
|
||||
dbhost: 127.0.0.1
|
||||
%end if
|
||||
dbtype: mysql
|
||||
dbname: ninestat
|
||||
dbuser: ninestat
|
||||
dbpass: "changeme"
|
||||
%set allow_hosts = %%getVar('ninestat_allow_hosts', '')
|
||||
%if %%dmode == "local"
|
||||
client_hosts: ["127.0.0.1", "localhost" %slurp
|
||||
%else if %%dmode == "externe"
|
||||
client_hosts: ["%%adresse_ip_eth0" %slurp
|
||||
%end if
|
||||
%if %%dmode != "default"
|
||||
%if %%is_empty(%%allow_hosts)
|
||||
]
|
||||
%else
|
||||
%for %%hst in %%allow_hosts
|
||||
,"%%hst" %slurp
|
||||
%end for
|
||||
]
|
||||
%end if
|
||||
%end if
|
||||
|
||||
createscript: "/usr/share/eole/db/ninestat/gen/ninestat-create-0.sql"
|
||||
|
||||
%set cnt_prefix = %%getVar('container_path_reseau', '')
|
||||
pwd_files:
|
||||
- {file: '%%cnt_prefix/var/www/html/ninestat/app/config/parameters.yml',
|
||||
pattern: ' database_password: "',
|
||||
end_pattern: '',
|
||||
owner: 'root:www-data',
|
||||
mod: '660' }
|
43
tmpl/ninestat-init-01.sql
Normal file
43
tmpl/ninestat-init-01.sql
Normal file
@ -0,0 +1,43 @@
|
||||
SET NAMES utf8;
|
||||
SET time_zone = '+00:00';
|
||||
SET foreign_key_checks = 0;
|
||||
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
|
||||
|
||||
INSERT IGNORE INTO `user` (`id`, `username`, `firstname`, `lastname`, `password`, `email`, `avatar`, `role`) VALUES
|
||||
(-100, 'admin', 'Administrateur', 'STAT', '{SSHA}euZCgZjWhBu0xUZI9lPK2ncV9oaB+Jqo', '%%system_mail_to', 'admin.jpg', 'ROLE_ADMIN');
|
||||
|
||||
|
||||
|
||||
DELETE FROM `config` WHERE `changeable` = 0;
|
||||
INSERT IGNORE INTO `config` (`order`, `visible`, `changeable`, `required`, `type`, `id`, `value`, `grouped`, `help`) VALUES
|
||||
('001', 1, 1, 1, 'string', 'appname', 'Ninestat', '', 'Le titre de votre site'),
|
||||
('002', 1, 0, 1, 'string', 'version', '1.0.0', '', 'Version de l\'application'),
|
||||
('003', 1, 1, 0, 'string', 'subappname', 'Statistique Envole', '', 'Le sous titre de votre site'),
|
||||
('004', 1, 1, 1, 'logo', 'logo', 'uploads/logo/logo.png', '', 'Le logo de votre site'),
|
||||
('005', 0, 1, 0, 'theme', 'theme', '', '', 'Le theme de votre site'),
|
||||
('006', 0, 1, 0, 'datauser', 'datauser', '', '', 'Parametrage des champs utilisateurs : obligatoire / facultatif / caché'),
|
||||
('007', 0, 1, 0, 'datausers', 'datausers', '', '', 'Parametrage des colonnes visible dans la liste des utilisateurs'),
|
||||
|
||||
('010', 1, 0, 1, 'boolean', 'fgforceconnect', '0', '', 'Forcer la connection afin de rendre votre site privé'),
|
||||
|
||||
('040', 1, 1, 1, 'boolean', 'fgheader', '1', '', 'Utiliser une image en bannière du site'),
|
||||
('041', 1, 1, 1, 'header', 'header', 'uploads/header/header.png', 'fgheader', 'Image en bannière du site'),
|
||||
('042', 1, 1, 1, 'integer', 'heightheader', '100', 'fgheader', 'Hauteur de la bannière du site'),
|
||||
|
||||
('050', 1, 1, 1, 'color', 'colormain', '2c3e50', '', 'Couleur principale de votre site'),
|
||||
('051', 1, 1, 1, 'color', 'fontcolorhover', 'ffffff', '', 'Couleur de la police sur couleur principale'),
|
||||
('052', 1, 1, 1, 'color', 'colorbody', 'ffffff', '', 'Couleur de fond de vos pages'),
|
||||
|
||||
('060', 1, 1, 1, 'font', 'fontfacetitle', 'Anton-Regular', '', 'Police des titres de votre site'),
|
||||
('061', 1, 1, 1, 'font', 'fontfacebody', 'Helvetica', '', 'Police des titres de votre site'),
|
||||
|
||||
%if %%activer_proxy_client == 'oui'
|
||||
('200', 1, 0, 1, 'boolean', 'PROXYactivate', '1', '', 'Définit un Proxy'),
|
||||
('201', 1, 0, 1, 'string', 'PROXYserver', '%%proxy_client_adresse', 'PROXYactivate','Adresse du Proxy'),
|
||||
('202', 1, 0, 1, 'string', 'PROXYport', '%%proxy_client_port', 'PROXYactivate','Port du Proxy');
|
||||
%else
|
||||
('200', 1, 0, 1, 'boolean', 'PROXYactivate', '0', '', 'Définit un Proxy'),
|
||||
('201', 1, 0, 1, 'string', 'PROXYserver', '', 'PROXYactivate','Adresse du Proxy'),
|
||||
('202', 1, 0, 1, 'string', 'PROXYport', '', 'PROXYactivate','Port du Proxy');
|
||||
%end if
|
||||
|
43
tmpl/ninestat-parameters.yml
Normal file
43
tmpl/ninestat-parameters.yml
Normal file
@ -0,0 +1,43 @@
|
||||
# This file is auto-generated during the composer install
|
||||
parameters:
|
||||
%if %%getVar("ninestat_db_mode", 'non') == "externe"
|
||||
database_host: %%ninestat_dbserver
|
||||
%if %%getVar('ninestat_dbport', 'non') != "non"
|
||||
database_port: %%ninestat_dbport
|
||||
%else
|
||||
database_port: null
|
||||
%end if
|
||||
%else if %%getVar("ninestat_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: %%edb_host
|
||||
%end if
|
||||
%end if
|
||||
%if %%getVar('edb_port', 'non') != "non"
|
||||
database_port: %%edb_port
|
||||
%else
|
||||
database_port: null
|
||||
%end if
|
||||
%else
|
||||
database_host: %%adresse_ip_mysql
|
||||
database_port: null
|
||||
%end if
|
||||
database_name: ninestat
|
||||
database_user: ninestat
|
||||
database_password: "changeme"
|
||||
mailer_transport: smtp
|
||||
%if %%is_defined("ninestat_smtphost")
|
||||
mailer_host: '%%ninestat_smtphost'
|
||||
mailer_user: '%%ninestat_smtpuser'
|
||||
mailer_password: '%%pwdreader("",%%ninestat_smtppwd)'
|
||||
%else
|
||||
mailer_host: 'localhost'
|
||||
mailer_user: ''
|
||||
mailer_password: ''
|
||||
%end if
|
||||
secret: ThisTokenIsNotSoSecretChangeIt
|
10
tmpl/ninestat-postservice-00.sh
Executable file
10
tmpl/ninestat-postservice-00.sh
Executable file
@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
%if %%activer_proxy_client == 'oui'
|
||||
export HTTP_PROXY="%%proxy_client_adresse:%%proxy_client_port"
|
||||
export HTTPS_PROXY="%%proxy_client_adresse:%%proxy_client_port"
|
||||
%end if
|
||||
|
||||
cd /var/www/html/ninestat
|
||||
|
||||
scripts/ninestat-postservice-01.sh
|
94
tmpl/ninestat-template.yml
Normal file
94
tmpl/ninestat-template.yml
Normal file
@ -0,0 +1,94 @@
|
||||
# This file is auto-generated during the composer install
|
||||
parameters:
|
||||
# Détermine la source de l'identité pour l'instant uniquement ninegate
|
||||
masteridentity: %%ninegate_masteridentity
|
||||
masterurl: %%ninestat_urlidentity
|
||||
masterapikey: %%ninestat_apikeyidentity
|
||||
|
||||
# Mode d'authentification soit LDAP / CAS / SAML
|
||||
# Pour l'instant SQL Impossible car l'identité est forcement stocké ailleurs donc il faut un autre moyen d'authentication
|
||||
mode_auth: %%ninegate_mode_auth
|
||||
|
||||
# Paramétres de base
|
||||
weburl: %%web_url
|
||||
alias: ninestat
|
||||
libelle_etab: %%libelle_etab
|
||||
numero_etab: %%numero_etab
|
||||
|
||||
# Module cron
|
||||
%if %%getVar("ninegate_activate_cron", 'non') == "oui"
|
||||
cron_activate: true
|
||||
%else
|
||||
cron_activate: false
|
||||
%end if
|
||||
|
||||
# Mail configuration
|
||||
%if %%is_defined("ninestat_smtpport")
|
||||
mailer_port: '%%ninestat_smtpport'
|
||||
mailer_encryption: %%ninestat_smtpencryption
|
||||
mailer_authmode: %%ninestat_smtpauthmode
|
||||
noreply: %%ninestat_noreply
|
||||
%else
|
||||
mailer_port: '2525'
|
||||
mailer_encryption: null
|
||||
mailer_authmode: null
|
||||
noreply: %%system_mail_to
|
||||
%end if
|
||||
|
||||
# Information de base de l'annuaire
|
||||
ldap_host: %%adresse_ip_ldap
|
||||
ldap_port: %%ldap_port
|
||||
%if %%getVar("activer_admin_passfile", 'non') == "oui"
|
||||
ldap_user: cn=admin,o=gouv,c=fr
|
||||
ldap_password: %%pwdreader("",%%ldap_admin_passfile)
|
||||
%else
|
||||
ldap_user: %%ldap_reader
|
||||
ldap_password: %%pwdreader("",%%ldap_reader_passfile)
|
||||
%end if
|
||||
ldap_basedn: o=gouv,c=fr
|
||||
|
||||
# Si mode_auth = CAS
|
||||
cas_host: %%eolesso_adresse
|
||||
cas_path: %%eolesso_cas_folder
|
||||
cas_port: %%eolesso_port
|
||||
|
||||
# Si mode_aut = SAML
|
||||
saml_entityid: 'http://dev.nuonet.cadoles'
|
||||
saml_logout_url: 'http://172.27.7.67:8088/idp/profile/Logout'
|
||||
saml_idps_list: ['http://172.27.7.67:8088/idp/shibboleth']
|
||||
|
||||
# Si mode_auth = CAS ou SAML 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
|
||||
|
||||
user_attr_saml_username: eduPersonPrincipalName
|
||||
user_attr_saml_mail: mail
|
||||
user_attr_saml_lastname: sn
|
||||
user_attr_saml_firstname: givenName
|
||||
|
||||
# Doctrine Configuration
|
||||
doctrine:
|
||||
dbal:
|
||||
default_connection: default
|
||||
connections:
|
||||
default:
|
||||
driver: pdo_mysql
|
||||
host: '%database_host%'
|
||||
port: '%database_port%'
|
||||
dbname: '%database_name%'
|
||||
user: '%database_user%'
|
||||
password: '%database_password%'
|
||||
charset: UTF8
|
||||
orm:
|
||||
default_entity_manager: default
|
||||
entity_managers:
|
||||
default:
|
||||
connection: default
|
||||
mappings:
|
||||
CadolesCoreBundle: ~
|
||||
CadolesCronBundle: ~
|
||||
|
||||
|
||||
|
1
tmpl/ninestat.cron
Normal file
1
tmpl/ninestat.cron
Normal file
@ -0,0 +1 @@
|
||||
* * * * * root /var/www/html/ninestat/scripts/ninestat-cron.sh &>/dev/null
|
Reference in New Issue
Block a user