[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/se3-logonpy/usr/share/se3/sbin/ -> update-logonpy.sh (source)

   1  #!/bin/bash
   2  
   3  # Recup param mysql
   4  dbhost=$(expr "$(grep mysqlServerIp /etc/SeConfig.ph)" : ".*'\(.*\)'.*")
   5  dbuser=$(expr "$(grep mysqlServerUsername /etc/SeConfig.ph)" : ".*'\(.*\)'.*")
   6  dbpass=$(expr "$(grep mysqlServerPw /etc/SeConfig.ph)" : ".*'\(.*\)'.*")
   7  dbname=$(expr "$(grep connexionDb /etc/SeConfig.ph)" : ".*'\(.*\)'.*")
   8  
   9  # La conf de logonpy est stocke la
  10  echo "dbhost=\"$dbhost\"" > /etc/se3/python/mysqlinfo.py
  11  echo "dbuser=\"$dbuser\"" >> /etc/se3/python/mysqlinfo.py
  12  echo "dbpass=\"$dbpass\"" >> /etc/se3/python/mysqlinfo.py
  13  echo "dbname=\"$dbname\"" >> /etc/se3/python/mysqlinfo.py
  14  
  15  
  16  workgroup="$(grep "workgroup" /etc/samba/smb.conf|cut -d '=' -f2|sed -s "s/ //g")"
  17  netbios="$(grep "netbios name" /etc/samba/smb.conf|cut -d '=' -f2|sed -s "s/ //g")"
  18  
  19  # Mise en place helper cpau
  20  if [ -e /usr/share/se3/includes/config.inc.sh ];then
  21  . /usr/share/se3/includes/config.inc.sh -m
  22  else
  23      echo "impossible de lire /usr/share/se3/includes/config.inc.sh"
  24      exit 1
  25  fi
  26  
  27  adminse3="adminse3"
  28  
  29  /usr/share/se3/sbin/update-share.sh -a netlogon logonpy.sh Win95
  30  /usr/share/se3/sbin/update-share.sh -a profiles logonpy-gpo.sh Win2K WinXP Vista
  31  
  32  ############################
  33  # Fix for wine when running from sudo
  34  export HOME=/root
  35  ############################
  36  cd /tmp
  37  env WINEDEBUG=-all wine /home/netlogon/CPAU.exe -u "$adminse3" -wait  -p "$xppass" -file gpo_helper.job -lwop -hide -ex "\\\\$netbios\\netlogon\\machine\\{%{COMPUTERNAME}%}\\EnableGPO.bat" -enc 
  38  env WINEDEBUG=-all wine /home/netlogon/CPAU.exe -u "$adminse3" -wait  -p "$xppass" -file Reg_helper.job -lwop -hide -ex "regedit.exe /s \\\\$netbios\\netlogon\\machine\\{%{COMPUTERNAME}%}\\user.reg&del /q \\\\$netbios\\netlogon\\machine\\{%{COMPUTERNAME}%}\\user.reg" -enc 
  39  rm -fr /home/netlogon/machine  && mkdir /home/netlogon/machine
  40  mv -f gpo_helper.job /home/netlogon/machine
  41  mv -f Reg_helper.job /home/netlogon/machine
  42  # on efface les verrous logonpy au cas où ...
  43  rm -f /home/netlogon/*.lck
  44  cd - >/dev/null 2>&1


Generated: Tue Mar 17 22:47:18 2015 Cross-referenced by PHPXref 0.7.1