Subversion Repositories ALCASAR

Rev

Rev 503 | Rev 518 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 503 Rev 510
Line 1... Line 1...
1
#!/bin/sh
1
#!/bin/sh
2
# $Id: alcasar-CA.sh 503 2011-03-11 22:12:32Z richard $
2
# $Id: alcasar-CA.sh 510 2011-03-20 21:46:17Z richard $
3
 
3
 
4
# alcasar-CA.sh
4
# alcasar-CA.sh
5
# by Franck BOUIJOUX, Pascal LEVANT and Richard REY
5
# by Franck BOUIJOUX, Pascal LEVANT and Richard REY
6
# This script is distributed under the Gnu General Public License (GPL)
6
# This script is distributed under the Gnu General Public License (GPL)
7
#
7
#
Line 167... Line 167...
167
 
167
 
168
# The value for organizationalUnitName must be 64 chars or less;
168
# The value for organizationalUnitName must be 64 chars or less;
169
#   thus, hostname must be 36 chars or less. If it's too big,
169
#   thus, hostname must be 36 chars or less. If it's too big,
170
#   try removing domain (merci REXY ;-) ).
170
#   try removing domain (merci REXY ;-) ).
171
hostname_len=`echo $hostname| wc -c`
171
hostname_len=`echo $hostname| wc -c`
172
 
-
 
173
if [ $hostname_len -gt 36 ];
172
if [ $hostname_len -gt 36 ];
174
then
173
then
175
  hostname=`echo $hostname | cut -d '.' -f 1`
174
  hostname=`echo $hostname | cut -d '.' -f 1`
176
fi
175
fi
177
 
176
 
178
if [ ! -f /etc/sysconfig/network-scripts/ifcfg-eth1 ]
-
 
179
then
-
 
180
  echo "Impossible de déterminer l'@-IP"
-
 
181
  exit 1
-
 
182
fi
-
 
183
IPADDR=`cat /etc/sysconfig/network-scripts/ifcfg-eth1 |grep IPADDR|cut -d"=" -f2`
-
 
184
CAMAIL=ca@$hostname
177
CAMAIL=ca@$hostname
185
SRVMAIL=apache@$hostname
178
SRVMAIL=apache@$hostname
186
 
179
 
187
echo 01 > $DIR_TMP/serial
180
echo 01 > $DIR_TMP/serial
188
touch $DIR_TMP/index.txt
181
touch $DIR_TMP/index.txt