Line 1... |
Line 1... |
1 |
#!/bin/bash
|
1 |
#!/bin/bash
|
2 |
# $Id: alcasar.sh 2657 2018-11-04 15:25:47Z tom.houdayer $
|
2 |
# $Id: alcasar.sh 2664 2018-11-19 17:35:12Z tom.houdayer $
|
3 |
|
3 |
|
4 |
# alcasar.sh
|
4 |
# alcasar.sh
|
5 |
# ALCASAR is a Free and open source NAC created by Franck BOUIJOUX (3abtux), Pascal LEVANT and Richard REY (Rexy)
|
5 |
# ALCASAR is a Free and open source NAC created by Franck BOUIJOUX (3abtux), Pascal LEVANT and Richard REY (Rexy)
|
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 |
# team@alcasar.net
|
7 |
# team@alcasar.net
|
Line 414... |
Line 414... |
414 |
secretradius=`cat /dev/urandom | tr -dc [:alnum:] | head -c16`
|
414 |
secretradius=`cat /dev/urandom | tr -dc [:alnum:] | head -c16`
|
415 |
echo "# Shared secret between coova-chilli and FreeRadius:" >> $PASSWD_FILE
|
415 |
echo "# Shared secret between coova-chilli and FreeRadius:" >> $PASSWD_FILE
|
416 |
echo "secret_radius=$secretradius" >> $PASSWD_FILE
|
416 |
echo "secret_radius=$secretradius" >> $PASSWD_FILE
|
417 |
chmod 640 $PASSWD_FILE
|
417 |
chmod 640 $PASSWD_FILE
|
418 |
# copy scripts in in /usr/local/bin
|
418 |
# copy scripts in in /usr/local/bin
|
419 |
cp -f $DIR_SCRIPTS/alcasar* $DIR_DEST_BIN/. ; chown root:root $DIR_DEST_BIN/alcasar* ; chmod 740 $DIR_DEST_BIN/alcasar*
|
419 |
cp -fr $DIR_SCRIPTS/alcasar* $DIR_DEST_BIN/. ; chown -R root:root $DIR_DEST_BIN/alcasar* ; chmod -R 740 $DIR_DEST_BIN/alcasar*
|
420 |
# copy conf files in /usr/local/etc
|
420 |
# copy conf files in /usr/local/etc
|
421 |
cp -f $DIR_CONF/etc/alcasar* $DIR_DEST_ETC/. ; chown -R root:apache $DIR_DEST_ETC ; chmod 770 $DIR_DEST_ETC ; chmod 660 $DIR_DEST_ETC/alcasar*
|
421 |
cp -f $DIR_CONF/etc/alcasar* $DIR_DEST_ETC/. ; chown -R root:apache $DIR_DEST_ETC ; chmod 770 $DIR_DEST_ETC ; chmod 660 $DIR_DEST_ETC/alcasar*
|
422 |
$SED "s?^DB_RADIUS=.*?DB_RADIUS=\"$DB_RADIUS\"?g" $DIR_DEST_BIN/alcasar-mysql.sh
|
422 |
$SED "s?^DB_RADIUS=.*?DB_RADIUS=\"$DB_RADIUS\"?g" $DIR_DEST_BIN/alcasar-mysql.sh
|
423 |
# generate central conf file
|
423 |
# generate central conf file
|
424 |
cat <<EOF > $CONF_FILE
|
424 |
cat <<EOF > $CONF_FILE
|