[ Index ] |
PHP Cross Reference of Unnamed Project |
[Summary view] [Print] [Text view]
1 #!/bin/bash 2 . /usr/share/se3/includes/config.inc.sh -cml 3 #. /usr/share/se3/includes/functions.inc.sh 4 debian_vers=$(cat /etc/debian_version) 5 [ -z "$netbios_name" ] && netbios_name=$(grep "netbios name" /etc/samba/smb.conf|cut -d '=' -f2|sed -e 's/ //g') 6 [ -z "$se3ip" ] && se3ip="$(LC_ALL=C grep address /etc/network/interfaces | sort | head -n1 | cut -d" " -f2)" 7 [ -z "$ecard" ] && ecard="$(grep iface /etc/network/interfaces | grep static | sort | head -n1 | awk '{print $2}')" 8 if [ -z "$adminPw" ]; then 9 echo "impossible de lire le parametre adminPw" 10 exit 1 11 fi 12 13 # Get network card 14 # 15 # if [ -z "$ECARD" ]; then 16 # ECARD=$(/sbin/ifconfig -a | grep eth | sort | head -n 1 | cut -d " " -f 1) 17 # fi 18 19 #Mise a l'heure du serveur 20 if [ ! -z "$slisip" ]; then 21 echo "Mise a l'heure sur le slis via ntp" 22 ntpdate $slisip 23 else 24 25 if [ ! -z "$ntpserv" ]; then 26 echo "Mise a l'heure sur le serveur ntp declare dans l'interface" 27 ntpdate $ntpserv 28 else 29 echo "Pas de serveur ntp declare dasn l'interface, Mise a l'heure sur le serveur de creteil" 30 ntpdate ntp.ac-creteil.fr 31 fi 32 33 fi 34 35 # openldap pass 36 echo $adminPw >/etc/ldap.secret 37 38 # Conf firefox 39 if [ ! -f /var/se3/unattended/install/packages/firefox/firefox-profile.js ]; then 40 cp -f /var/se3/unattended/install/packages/firefox/firefox-profile.ori /var/se3/unattended/install/packages/firefox/firefox-profile.js 41 fi 42 43 # Mrtg 44 sed -i "s/eth0/$ecard/g" /etc/mrtg.cfg 45 sed -i "s/growright//g" /etc/mrtg.cfg 46 indexmaker --output=/var/www/se3/sysmon/index.html /etc/mrtg.cfg 47 env LANG=C /usr/bin/mrtg /etc/mrtg.cfg 2>/dev/null 48 env LANG=C /usr/bin/mrtg /etc/mrtg.cfg 2>/dev/null 49 env LANG=C /usr/bin/mrtg /etc/mrtg.cfg 2>/dev/null 50 51 # Build Encode::compat 52 ( 53 cd /usr/src/Encode-compat-0.05 54 perl Makefile.PL 55 make 56 make install 57 cd - 58 ) >/dev/null 59 ( 60 # Apache2se 61 update-rc.d -f apache2se remove . 62 update-rc.d apache2se defaults 91 91 63 64 # Admind 65 /etc/init.d/admind stop 66 update-rc.d -f admind remove . 67 update-rc.d admind defaults 99 99 68 /etc/init.d/admind start 69 70 # SSH 71 update-rc.d -f ssh remove . 72 update-rc.d ssh defaults 16 16 73 ) >/dev/null 74 75 # Cron 76 #/etc/init.d/cron restart ---> plus bas 77 78 # Logs 79 touch /var/log/se3/auth.log 80 81 # Wget 82 cat /etc/wgetrc |grep "passive_ftp = on" > /dev/null || echo "passive_ftp = on" >> /etc/wgetrc 83 84 # Remote adm 85 if [ ! -e /var/remote_adm/.ssh/id_rsa.pub ]; then 86 chown www-se3 -R /var/remote_adm 87 su www-se3 -c 'ssh-keygen -t rsa -f /var/remote_adm/.ssh/id_rsa -N ""' 88 fi 89 90 # Mkslurpd ---> deprecated a vi 91 #sed -i "s/#MYSQLIP#/$MYSQLIP/g;s/#SE3DBPASS#/$SE3PW/g" /usr/share/se3/sbin/mkslurpd 92 93 # Syslog 94 if [ -e /etc/init.d/sysklogd ]; then 95 /etc/init.d/sysklogd restart 96 else 97 /etc/init.d/rsyslog restart 98 fi 99 100 echo "update de la configuration samba" 101 smbpasswd -w $adminPw 102 /usr/share/se3/sbin/update-smbconf.sh 103 104 # Shares conf 105 /usr/share/se3/sbin/update-share.sh -d 106 107 108 109 # Templates 110 for template in base admin eleves profs 111 do 112 for logon in /home/templates/$template/.logon*.bat 113 do 114 dst=$(expr $logon : '.*\.\([^/]*\).bat') 115 if [ ! -f /home/templates/$template/$dst.bat ] 116 then 117 sed -e "s/%se3pdc%/$netbios_name/g" $logon >/home/templates/$template/$dst.bat 118 fi 119 done 120 done 121 122 123 # Firefox 124 if [ ! -e /etc/skel/user/profil/appdata/Mozilla/Firefox/Profiles/default/prefs.js ]; then 125 proxyurl=$(grep http_proxy /etc/profile | grep -v export | cut -d= -f2 | sed -e "s/http:\/\///;s/\"//g") 126 127 sed -i "s/%ip%/$se3ip/g;s/%se3pdc%/$(hostname -f)/g" /etc/skel/user/profil/appdata/Mozilla/Firefox/Profiles/default/hostperm.1 128 /usr/share/se3/scripts/modifProxy.sh $proxyurl 129 130 fi 131 132 /etc/init.d/cron reload 133 134 echo "Maj sudoers..." 135 cp -f /etc/sudoers.se3 /etc/sudoers 136 chmod 440 /etc/sudoers 137 138 139 service apache2 reload 140 service apache2se reload 141 #/etc/init.d/slapd restart 142 /var/cache/se3_install/depmaj/install_supervision_rouen.sh 143 144 # Corrige icone reparer son compte si L: toujours utilise pour Progs 145 grep W: /home/templates/base/logon.bat >/dev/null || cp -f /var/cache/se3_install/conf/Reparer\ son\ compte_legacy.lnk /home/templates/base/Bureau/Reparer\ son\ compte.lnk 146 /usr/share/se3/includes/config.inc.sh -clpbmsdf
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Tue Mar 17 22:47:18 2015 | Cross-referenced by PHPXref 0.7.1 |