Skip to content
Snippets Groups Projects
Verified Commit 9f8d1380 authored by David Beniamine's avatar David Beniamine
Browse files

Update server name on configuration import

parent a5290614
Branches
No related tags found
No related merge requests found
...@@ -38,12 +38,8 @@ echo "Updating eole" ...@@ -38,12 +38,8 @@ echo "Updating eole"
Maj-Auto Maj-Auto
# Configure # Configure
echo "Copying configuration" $DIR/import_config.sh
cp -v $DIR/eole/config.eol /etc/eole/
cp -v $DIR/eole/creole/* /usr/share/eole/creole/modif
cp -v $DIR/eole/era/* /usr/share/era/modeles
gen_patch
echo "Please set the school network IP, save and quit the configurator" echo "Please set the school network IP, save and quit the configurator"
gen_config gen_config
echo "Configuring server" echo "Configuring server"
......
...@@ -49,7 +49,9 @@ safe_run Maj-Auto ...@@ -49,7 +49,9 @@ safe_run Maj-Auto
echo "Generating containers" echo "Generating containers"
safe_run gen_conteneurs safe_run gen_conteneurs
cp -v $DIR/eole/config.eol /etc/eole/
$DIR/import_config.sh
echo "Generating initial config" echo "Generating initial config"
safe_run gen_config safe_run gen_config
......
{"bareos_dir_name": {"owner": "forced", "val": "amonecole-dir"}, "type_amon": {"owner": "gen_config", "val": "2zones-amonecole-cuques"}, "adresse_ip_eth1_proxy_link": {"owner": "gen_config", "val": "10.20.1.2"}, "activer_ajout_hosts": {"owner": "gen_config", "val": "oui"}, "nom_domaine_local": {"owner": "gen_config", "val": "ecoletest.plandecuques.fr"}, "nom_court_hosts": {"owner": {"0": "gen_config"}, "val": {"0": "dnsproxy"}}, "activer_squid_auth": {"owner": "gen_config", "val": "non"}, "bareos_sd_password": {"owner": "forced", "val": "01006d73c6f13edbff49539ea6a50b744c26d4f1380cfad072df4daf"}, "adresse_ip_hosts": {"owner": "gen_config", "val": ["10.20.1.2"]}, "bareos_db_mysql_password": {"owner": "gen_config", "val": "38a0a5ed7180cb6fc3660b4049dc111deecf5e67aed721e839e88536"}, "adresse_ip_fichier_link": {"owner": "gen_config", "val": "10.20.1.3"}, "nom_machine": {"owner": "gen_config", "val": "ecoletest"}, "bareos_dir_password": {"owner": "forced", "val": "548c71a8e99ce2452009f2d21d225da30e6f2bba95cb05bfc8cf7b98"}, "ip_haute_dhcp": {"owner": {"bareos_dir_name": {"owner": "forced", "val": "amonecole-dir"}, "type_amon": {"owner": "gen_config", "val": "2zones-amonecole-cuques"}, "adresse_ip_eth1_proxy_link": {"owner": "gen_config", "val": "10.20.1.2"}, "activer_ajout_hosts": {"owner": "gen_config", "val": "oui"}, "nom_domaine_local": {"owner": "gen_config", "val": "malraux1.plandecuques.fr"}, "nom_court_hosts": {"owner": {"0": "gen_config"}, "val": {"0": "dnsproxy"}}, "activer_squid_auth": {"owner": "gen_config", "val": "non"}, "bareos_sd_password": {"owner": "forced", "val": "01006d73c6f13edbff49539ea6a50b744c26d4f1380cfad072df4daf"}, "adresse_ip_hosts": {"owner": "gen_config", "val": ["10.20.1.2"]}, "bareos_db_mysql_password": {"owner": "gen_config", "val": "38a0a5ed7180cb6fc3660b4049dc111deecf5e67aed721e839e88536"}, "adresse_ip_fichier_link": {"owner": "gen_config", "val": "10.20.1.3"}, "nom_machine": {"owner": "gen_config", "val": "amonecole"}, "bareos_dir_password": {"owner": "forced", "val": "548c71a8e99ce2452009f2d21d225da30e6f2bba95cb05bfc8cf7b98"}, "ip_haute_dhcp": {"owner": {"0": "gen_config"}, "val": {"0": "10.20.1.254"}}, "domaine_messagerie_etab": {"owner": "gen_config", "val": "malraux1.plandecuques.fr"}, "___version___": "2.6.2", "esu_proxy": {"owner": "gen_config", "val": "oui"}, "activer_dhcp": {"owner": "gen_config", "val": "oui"}, "ip_basse_dhcp": {"owner": {"0": "gen_config"}, "val": {"0": "10.20.1.20"}}, "activer_tftp": {"owner": "gen_config", "val": "oui"}, "bareos_fd_password": {"owner": "forced", "val": "0d2b71cdcc90c4367dcd47fe16bd7d308b7e22aca4c4fe36014c22e0"}, "nom_plage_dhcp": {"owner": {"0": "gen_config"}, "val": {"0": "ecole"}}, "system_mail_to": {"owner": "gen_config", "val": "root@malraux1.plandecuques.fr"}, "eth0_method": {"owner": "gen_config", "val": "dhcp"}, "activer_ead_web": {"owner": "gen_config", "val": "oui"}, "ip_admin_eth0": {"owner": "gen_config", "val": ["192.168.3.208", "193.33.56.228", "84.240.95.168"]}, "cert_type": {"owner": "gen_config", "val": "autosign\u00e9"}, "ip_admin_eth1": {"owner": "gen_config", "val": ["10.20.1.24"]}, "numero_etab": {"owner": "gen_config", "val": "malraux1"}, "nom_long_hosts": {"owner": {"0": "gen_config"}, "val": {"0": "dnsproxy.malraux1.plandecuques.fr"}}, "netmask_admin_eth1": {"owner": {"0": "gen_config"}, "val": {"0": "255.255.255.255"}}, "netmask_admin_eth0": {"owner": {"1": "gen_config", "0": "gen_config", "2": "gen_config"}, "val": {"1": "255.255.255.255", "0": "255.255.255.255", "2": "255.255.255.255"}}, "activer_ftp_anonymous_access": {"owner": "gen_config", "val": "oui"}, "smb_share_model": {"owner": "gen_config", "val": "commun"}, "bareos_db_type": {"owner": "forced", "val": "mysql"}, "esu_proxy_default": {"owner": "forced", "val": "oui"}, "nom_academie": {"owner": "gen_config", "val": "ac-marseille"}, "ip_ssh_eth1": {"owner": "gen_config", "val": ["10.20.1.1"]}, "ip_ssh_eth0": {"owner": "gen_config", "val": ["192.168.3.208", "193.33.56.228", "84.240.95.168", "192.168.3.210"]}, "libelle_etab": {"owner": "gen_config", "val": "malraux1"}, "smb_workgroup": {"owner": "gen_config", "val": "ecole-wg"}, "ftp_anonymous_directory": {"owner": "gen_config", "val": "/var/lib/tftpboot/public"}, "smb_netbios_name": {"owner": "gen_config", "val": "ecole-srv"}, "netmask_ssh_eth0": {"owner": {"1": "gen_config", "0": "gen_config", "3": "gen_config", "2": "gen_config"}, "val": {"1": "255.255.255.255", "0": "255.255.255.255", "3": "255.255.255.255", "2": "255.255.255.255"}}, "netmask_ssh_eth1": {"owner": {"0": "gen_config"}, "val": {"0": "255.255.255.255"}}, "omapi_secret": {"owner": "forced", "val": "42f0707bbf047e86da7fb90aa0752f750503be5899135f2ea6542a34"}, "activer_exim_relay_smtp": {"owner": "gen_config", "val": "non"}, "adresse_ip_eth1": {"owner": "gen_config", "val": "10.20.1.1"}, "adresse_ip_eth2": {"owner": "gen_config", "val": "10.20.2.1"}, "web_url": {"owner": "gen_config", "val": "malraux1.plandecuques.fr"}, "adresse_ip_eth2_proxy_link": {"owner": "gen_config", "val": "10.20.2.2"}, "activer_ead3": {"owner": "gen_config", "val": "oui"}, "nombre_interfaces": {"owner": "gen_config", "val": "2"}, "repertoire_tftp": {"owner": "gen_config", "val": "/var/lib/tftpboot/"}}
{"0": "gen_config"}, "val": {"0": "10.20.1.254"}}, "domaine_messagerie_etab": {"owner": "gen_config", "val": "test.ac-marseille.fr"}, "___version___": "2.6.2", "nom_long_hosts": {"owner": {"0": "gen_config"}, "val": {"0": "dnsproxy.ecoletest.plandecuques.fr"}}, "activer_dhcp": {"owner": "gen_config", "val": "oui"}, "ip_basse_dhcp": {"owner": {"0": "gen_config"}, "val": {"0": "10.20.1.20"}}, "activer_tftp": {"owner": "gen_config", "val": "oui"}, "bareos_fd_password": {"owner": "forced", "val": "0d2b71cdcc90c4367dcd47fe16bd7d308b7e22aca4c4fe36014c22e0"}, "nom_plage_dhcp": {"owner": {"0": "gen_config"}, "val": {"0": "ecole"}}, "system_mail_to": {"owner": "gen_config", "val": "root@test.ac-marseille.fr"}, "eth0_method": {"owner": "gen_config", "val": "dhcp"}, "activer_ead_web": {"owner": "gen_config", "val": "oui"}, "ip_admin_eth0": {"owner": "gen_config", "val": ["192.168.211.228"]}, "cert_type": {"owner": "gen_config", "val": "autosign\u00e9"}, "ip_admin_eth1": {"owner": "gen_config", "val": ["10.20.0.30"]}, "numero_etab": {"owner": "gen_config", "val": "test"}, "netmask_admin_eth1": {"owner": {"0": "gen_config"}, "val": {"0": "255.255.255.255"}}, "netmask_admin_eth0": {"owner": {"0": "gen_config"}, "val": {"0": "255.255.255.255"}}, "activer_ftp_anonymous_access": {"owner": "gen_config", "val": "oui"}, "smb_share_model": {"owner": "gen_config", "val": "commun"}, "bareos_db_type": {"owner": "forced", "val": "mysql"}, "esu_proxy_default": {"owner": "forced", "val": "oui"}, "nom_academie": {"owner": "gen_config", "val": "ac-marseille"}, "ip_ssh_eth1": {"owner": "gen_config", "val": ["10.20.1.1"]}, "ip_ssh_eth0": {"owner": "gen_config", "val": ["192.168.211.228", "193.33.56.228"]}, "libelle_etab": {"owner": "gen_config", "val": "test"}, "smb_workgroup": {"owner": "gen_config", "val": "ecole-wg"}, "smb_netbios_name": {"owner": "gen_config", "val": "ecole-srv"}, "netmask_ssh_eth0": {"owner": {"1": "gen_config", "0": "gen_config"}, "val": {"1": "255.255.255.255", "0": "255.255.255.255"}}, "netmask_ssh_eth1": {"owner": {"0": "gen_config"}, "val": {"0": "255.255.255.255"}}, "omapi_secret": {"owner": "forced", "val": "42f0707bbf047e86da7fb90aa0752f750503be5899135f2ea6542a34"}, "activer_exim_relay_smtp": {"owner": "gen_config", "val": "non"}, "adresse_ip_eth1": {"owner": "gen_config", "val": "10.20.1.1"}, "web_url": {"owner": "gen_config", "val": "test.ac-marseille.fr"}, "activer_ead3": {"owner": "gen_config", "val": "oui"}, "ftp_anonymous_directory": {"owner": "gen_config", "val": "/var/lib/tftpboot/public"}, "repertoire_tftp": {"owner": "gen_config", "val": "/var/lib/tftpboot/"}} \ No newline at end of file
#!/bin/bash
DIR=`dirname $0`
srvname=`cat $DIR/srvname`
if [ -z "$1" ]
then
echo "Veuillez entrer le nom du serveur (ex: malraux1) :"
read $srvname
echo $srvname > $DIR/srvname
fi
echo "Copying configuration"
sed -e "s/malraux1/$srvname/g" $DIR/eole/config.eol > /etc/eole/config.eol
cp -v $DIR/eole/creole/* /usr/share/eole/creole/modif
cp -v $DIR/eole/era/* /usr/share/era/modeles
gen_patch
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment