Line 1... |
Line 1... |
1 |
#!/bin/bash
|
1 |
#!/bin/bash
|
2 |
# $Id: alcasar.sh 1945 2016-06-14 21:34:14Z richard $
|
2 |
# $Id: alcasar.sh 1954 2016-06-18 19:46:53Z richard $
|
3 |
|
3 |
|
4 |
# alcasar.sh
|
4 |
# alcasar.sh
|
5 |
|
5 |
|
6 |
# ALCASAR Install script - CopyLeft ALCASAR Team [Rexy + 3abtux + Steweb + Crox + ...]
|
6 |
# ALCASAR Install script - CopyLeft ALCASAR Team [Rexy + 3abtux + Steweb + Crox + ...]
|
7 |
# Ce programme est un logiciel libre ; This software is free and open source
|
7 |
# Ce programme est un logiciel libre ; This software is free and open source
|
Line 378... |
Line 378... |
378 |
echo "$secretradius" >> $PASSWD_FILE
|
378 |
echo "$secretradius" >> $PASSWD_FILE
|
379 |
chmod 640 $PASSWD_FILE
|
379 |
chmod 640 $PASSWD_FILE
|
380 |
# copy scripts in in /usr/local/bin
|
380 |
# copy scripts in in /usr/local/bin
|
381 |
cp -f $DIR_SCRIPTS/alcasar* $DIR_DEST_BIN/. ; chown root:root $DIR_DEST_BIN/alcasar* ; chmod 740 $DIR_DEST_BIN/alcasar*
|
381 |
cp -f $DIR_SCRIPTS/alcasar* $DIR_DEST_BIN/. ; chown root:root $DIR_DEST_BIN/alcasar* ; chmod 740 $DIR_DEST_BIN/alcasar*
|
382 |
# copy conf files in /usr/local/etc
|
382 |
# copy conf files in /usr/local/etc
|
383 |
cp -f $DIR_CONF/etc/alcasar* $DIR_DEST_ETC/. ; chown root:apache $DIR_DEST_ETC/alcasar* ; chmod 660 $DIR_DEST_ETC/alcasar*
|
383 |
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*
|
384 |
$SED "s?^radiussecret.*?radiussecret=\"$secretradius\"?g" $DIR_DEST_BIN/alcasar-logout.sh
|
384 |
$SED "s?^radiussecret.*?radiussecret=\"$secretradius\"?g" $DIR_DEST_BIN/alcasar-logout.sh
|
385 |
$SED "s?^DB_RADIUS=.*?DB_RADIUS=\"$DB_RADIUS\"?g" $DIR_DEST_BIN/alcasar-mysql.sh
|
385 |
$SED "s?^DB_RADIUS=.*?DB_RADIUS=\"$DB_RADIUS\"?g" $DIR_DEST_BIN/alcasar-mysql.sh
|
386 |
$SED "s?^DB_USER=.*?DB_USER=\"$DB_USER\"?g" $DIR_DEST_BIN/alcasar-mysql.sh $DIR_DEST_BIN/alcasar-conf.sh
|
386 |
$SED "s?^DB_USER=.*?DB_USER=\"$DB_USER\"?g" $DIR_DEST_BIN/alcasar-mysql.sh $DIR_DEST_BIN/alcasar-conf.sh
|
387 |
$SED "s?^radiuspwd=.*?radiuspwd=\"$radiuspwd\"?g" $DIR_DEST_BIN/alcasar-mysql.sh $DIR_DEST_BIN/alcasar-conf.sh
|
387 |
$SED "s?^radiuspwd=.*?radiuspwd=\"$radiuspwd\"?g" $DIR_DEST_BIN/alcasar-mysql.sh $DIR_DEST_BIN/alcasar-conf.sh
|
388 |
# generate central conf file
|
388 |
# generate central conf file
|
Line 1640... |
Line 1640... |
1640 |
do
|
1640 |
do
|
1641 |
mkdir $DIR_DG/lists/blacklists/ossi-bl-$x
|
1641 |
mkdir $DIR_DG/lists/blacklists/ossi-bl-$x
|
1642 |
cp $DIR_BLACKLIST/$x $DIR_DG/lists/blacklists/ossi-bl-$x/domains
|
1642 |
cp $DIR_BLACKLIST/$x $DIR_DG/lists/blacklists/ossi-bl-$x/domains
|
1643 |
echo "ossi-bl-$x" >> $DIR_DEST_ETC/alcasar-bl-categories-enabled
|
1643 |
echo "ossi-bl-$x" >> $DIR_DEST_ETC/alcasar-bl-categories-enabled
|
1644 |
done
|
1644 |
done
|
1645 |
chown -R dansguardian:apache $DIR_DG $DIR_DEST_SHARE
|
1645 |
chown -R dansguardian:apache $DIR_DG
|
- |
|
1646 |
chown -R root:apache $DIR_DEST_SHARE
|
1646 |
chmod -R g+rw $DIR_DG $DIR_DEST_SHARE
|
1647 |
chmod -R g+rw $DIR_DG $DIR_DEST_SHARE
|
1647 |
# adapt the Toulouse BL to ALCASAR architecture
|
1648 |
# adapt the Toulouse BL to ALCASAR architecture
|
1648 |
$DIR_DEST_BIN/alcasar-bl.sh --adapt
|
1649 |
$DIR_DEST_BIN/alcasar-bl.sh --adapt
|
1649 |
# enable the default categories
|
1650 |
# enable the default categories
|
1650 |
$DIR_DEST_BIN/alcasar-bl.sh --cat_choice
|
1651 |
$DIR_DEST_BIN/alcasar-bl.sh --cat_choice
|