Line 1... |
Line 1... |
1 |
#!/bin/bash
|
1 |
#!/bin/bash
|
2 |
# $Id: alcasar.sh 1373 2014-06-04 12:38:50Z richard $
|
2 |
# $Id: alcasar.sh 1374 2014-06-04 17:09:43Z 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 1050... |
Line 1050... |
1050 |
##################################################################
|
1050 |
##################################################################
|
1051 |
param_dansguardian ()
|
1051 |
param_dansguardian ()
|
1052 |
{
|
1052 |
{
|
1053 |
mkdir /var/dansguardian
|
1053 |
mkdir /var/dansguardian
|
1054 |
chown dansguardian /var/dansguardian
|
1054 |
chown dansguardian /var/dansguardian
|
- |
|
1055 |
$SED "s/^ExecStart=.*?ExecStart=/usr/sbin/dansguardian -c /etc/dansguardian/dansguardian.conf?g" /lib/systemd/system/dansguardian.service
|
- |
|
1056 |
$SED "s/^After=.*?After=network.target chilli.target?g" /lib/systemd/system/dansguardian.service
|
1055 |
[ -e $DIR_DG/dansguardian.conf.default ] || cp $DIR_DG/dansguardian.conf $DIR_DG/dansguardian.conf.default
|
1057 |
[ -e $DIR_DG/dansguardian.conf.default ] || cp $DIR_DG/dansguardian.conf $DIR_DG/dansguardian.conf.default
|
1056 |
# By default the filter is off
|
1058 |
# By default the filter is off
|
1057 |
$SED "s/^reportinglevel =.*/reportinglevel = -1/g" $DIR_DG/dansguardian.conf
|
1059 |
$SED "s/^reportinglevel =.*/reportinglevel = -1/g" $DIR_DG/dansguardian.conf
|
1058 |
# French deny HTML page
|
1060 |
# French deny HTML page
|
1059 |
$SED "s?^language =.*?language = french?g" $DIR_DG/dansguardian.conf
|
1061 |
$SED "s?^language =.*?language = french?g" $DIR_DG/dansguardian.conf
|
Line 1161... |
Line 1163... |
1161 |
cat << EOF >> /etc/ulogd-$log_type.conf
|
1163 |
cat << EOF >> /etc/ulogd-$log_type.conf
|
1162 |
[LOGEMU]
|
1164 |
[LOGEMU]
|
1163 |
file="/var/log/firewall/$log_type.log"
|
1165 |
file="/var/log/firewall/$log_type.log"
|
1164 |
sync=1
|
1166 |
sync=1
|
1165 |
EOF
|
1167 |
EOF
|
1166 |
$SED "s?^ExecStart=.*?ExecStart=/usr/sbin/ulogd -C /etc/ulogd-$log_type.conf?g" /lib/systemd/system/ulogd-$log_type.service
|
1168 |
$SED "s?^ExecStart=.*?ExecStart=/usr/sbin/ulogd -c /etc/ulogd-$log_type.conf?g" /lib/systemd/system/ulogd-$log_type.service
|
1167 |
nl=`expr $nl + 1`
|
1169 |
nl=`expr $nl + 1`
|
1168 |
done
|
1170 |
done
|
1169 |
chown -R root:apache /var/log/firewall
|
1171 |
chown -R root:apache /var/log/firewall
|
1170 |
chmod 750 /var/log/firewall
|
1172 |
chmod 750 /var/log/firewall
|
1171 |
chmod 640 /var/log/firewall/*
|
1173 |
chmod 640 /var/log/firewall/*
|