Line 1... |
Line 1... |
1 |
#!/bin/bash
|
1 |
#!/bin/bash
|
2 |
# $Id: alcasar-conf.sh 3238 2024-12-02 22:38:59Z rexy $
|
2 |
# $Id: alcasar-conf.sh 3243 2025-01-19 17:33:09Z rexy $
|
3 |
|
3 |
|
4 |
# alcasar-conf.sh
|
4 |
# alcasar-conf.sh
|
5 |
# by REXY
|
5 |
# by 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 |
|
7 |
|
Line 75... |
Line 75... |
75 |
cp /var/Save/base/"$(ls -1t /var/Save/base|head -1)" $DIR_UPDATE
|
75 |
cp /var/Save/base/"$(ls -1t /var/Save/base|head -1)" $DIR_UPDATE
|
76 |
# backup organism logo
|
76 |
# backup organism logo
|
77 |
cp -f $DIR_WEB/images/organisme.png $DIR_UPDATE
|
77 |
cp -f $DIR_WEB/images/organisme.png $DIR_UPDATE
|
78 |
# backup E2D BL/WL custom files
|
78 |
# backup E2D BL/WL custom files
|
79 |
mkdir $DIR_UPDATE/custom_bl
|
79 |
mkdir $DIR_UPDATE/custom_bl
|
80 |
for i in urlregexplist exceptionsitelist bannedurllist
|
80 |
for i in urlregexplist exceptionsitelist bannedurllist exceptionsiteiplist
|
81 |
do
|
81 |
do
|
82 |
cp $DIR_E2G/group1/$i $DIR_UPDATE/custom_bl/
|
82 |
cp $DIR_E2G/group1/$i $DIR_UPDATE/custom_bl/
|
83 |
done
|
83 |
done
|
84 |
cp $DIR_E2G/common/exceptioniplist $DIR_UPDATE/custom_bl/
|
- |
|
85 |
cp -rf $DIR_BLACKLIST/ossi-* $DIR_UPDATE/custom_bl/ 2>/dev/null
|
84 |
cp -rf $DIR_BLACKLIST/ossi-* $DIR_UPDATE/custom_bl/ 2>/dev/null
|
86 |
# backup conf files (main conf file, filtering, digest, etc.)
|
85 |
# backup conf files (main conf file, filtering, digest, etc.)
|
87 |
mkdir $DIR_UPDATE/etc/
|
86 |
mkdir $DIR_UPDATE/etc/
|
88 |
cp -rf $DIR_ETC/* $DIR_UPDATE/etc/
|
87 |
cp -rf $DIR_ETC/* $DIR_UPDATE/etc/
|
89 |
cp -f /etc/hosts $DIR_UPDATE/etc/
|
88 |
cp -f /etc/hosts $DIR_UPDATE/etc/
|
Line 175... |
Line 174... |
175 |
[ -e $DIR_UPDATE/etc/alcasar-letsencrypt ] && cp -f $DIR_UPDATE/etc/alcasar-letsencrypt $DIR_ETC/ # Letsencrypt local conf
|
174 |
[ -e $DIR_UPDATE/etc/alcasar-letsencrypt ] && cp -f $DIR_UPDATE/etc/alcasar-letsencrypt $DIR_ETC/ # Letsencrypt local conf
|
176 |
[ -d $DIR_UPDATE/etc/letsencrypt ] && cp -rf $DIR_UPDATE/etc/letsencrypt $DIR_ETC/ # Letsencrypt local conf files
|
175 |
[ -d $DIR_UPDATE/etc/letsencrypt ] && cp -rf $DIR_UPDATE/etc/letsencrypt $DIR_ETC/ # Letsencrypt local conf files
|
177 |
[ -e $DIR_UPDATE/gammurc ] && cp -f $DIR_UPDATE/gammurc /etc/ # Gammu conf file
|
176 |
[ -e $DIR_UPDATE/gammurc ] && cp -f $DIR_UPDATE/gammurc /etc/ # Gammu conf file
|
178 |
[ -e $DIR_UPDATE/gammu_smsd_conf ] && cp -f $DIR_UPDATE/gammu_smsd_conf /etc/ # Gammu_smsd conf file
|
177 |
[ -e $DIR_UPDATE/gammu_smsd_conf ] && cp -f $DIR_UPDATE/gammu_smsd_conf /etc/ # Gammu_smsd conf file
|
179 |
# Retrieve BL/WL custom files
|
178 |
# Retrieve BL/WL custom files
|
180 |
cp -f $DIR_UPDATE/custom_bl/exceptioniplist $DIR_E2G/common/
|
- |
|
181 |
cp -f $DIR_UPDATE/custom_bl/exceptionsitelist $DIR_E2G/group1/
|
179 |
for i in urlregexplist exceptionsitelist bannedurllist exceptionsiteiplist
|
- |
|
180 |
do
|
182 |
cp -f $DIR_UPDATE/custom_bl/urlregexplist $DIR_E2G/group1/
|
181 |
cp -f $DIR_UPDATE/custom_bl/$i $DIR_E2G/group1/
|
183 |
cp -f $DIR_UPDATE/custom_bl/bannedurllist $DIR_E2G/group1/
|
182 |
done
|
184 |
cp -rf $DIR_UPDATE/custom_bl/ossi-* $DIR_BLACKLIST/ 2>/dev/null
|
183 |
cp -rf $DIR_UPDATE/custom_bl/ossi-* $DIR_BLACKLIST/ 2>/dev/null
|
185 |
chown -R e2guardian:apache $DIR_E2G
|
184 |
chown -R e2guardian:apache $DIR_E2G
|
186 |
chmod -R g+rw $DIR_E2G
|
185 |
chmod -R g+rw $DIR_E2G
|
187 |
# Adapt DNS/URL filtering
|
186 |
# Adapt DNS/URL filtering
|
188 |
PARENT_SCRIPT=`basename $0`
|
187 |
PARENT_SCRIPT=`basename $0`
|