Attaque des vhost et du bind rangé à la Debian
This commit is contained in:
parent
097fb930d2
commit
1ce2db723d
|
@ -16,17 +16,15 @@ usr/lib/alternc/install.d
|
||||||
usr/sbin
|
usr/sbin
|
||||||
usr/share/alternc/install
|
usr/share/alternc/install
|
||||||
usr/share/locale/fr/LC_MESSAGES
|
usr/share/locale/fr/LC_MESSAGES
|
||||||
var/alternc/apache-vhost
|
|
||||||
var/alternc/apacheconf
|
|
||||||
var/alternc/bind
|
|
||||||
var/alternc/bind/zones
|
|
||||||
var/alternc/cgi-bin
|
var/alternc/cgi-bin
|
||||||
var/alternc/db
|
var/alternc/db
|
||||||
var/alternc/exec.usr
|
var/alternc/exec.usr
|
||||||
var/alternc/mla
|
var/alternc/mla
|
||||||
var/alternc/sessions
|
var/alternc/sessions
|
||||||
var/alternc/tmp
|
var/alternc/tmp
|
||||||
var/alternc/logs
|
|
||||||
var/backups/alternc
|
var/backups/alternc
|
||||||
|
/var/lib/alternc/apache-vhost
|
||||||
|
/var/lib/alternc/bind
|
||||||
|
/var/lib/alternc/bind/zones
|
||||||
var/log/alternc
|
var/log/alternc
|
||||||
var/run/alternc
|
var/run/alternc
|
||||||
|
|
|
@ -245,9 +245,9 @@ EOF
|
||||||
#find /var/alternc/dns/ -type l -lname /var/alternc/bureau -exec rm {} \;
|
#find /var/alternc/dns/ -type l -lname /var/alternc/bureau -exec rm {} \;
|
||||||
|
|
||||||
# Bind stuff
|
# Bind stuff
|
||||||
touch /var/alternc/bind/automatic.conf /var/alternc/bind/slaveip.conf
|
touch /var/lib/alternc/bind/automatic.conf /var/lib/alternc/bind/slaveip.conf
|
||||||
chown root:bind /var/alternc/bind/automatic.conf /var/alternc/bind/slaveip.conf
|
chown root:bind /var/lib/alternc/bind/automatic.conf /var/lib/alternc/bind/slaveip.conf
|
||||||
chmod 640 /var/alternc/bind/automatic.conf /var/alternc/bind/slaveip.conf
|
chmod 640 /var/lib/alternc/bind/automatic.conf /var/lib/alternc/bind/slaveip.conf
|
||||||
touch /var/run/alternc/refresh_slave
|
touch /var/run/alternc/refresh_slave
|
||||||
/usr/lib/alternc/slave_dns
|
/usr/lib/alternc/slave_dns
|
||||||
# Apache will not start without this file
|
# Apache will not start without this file
|
||||||
|
|
|
@ -29,9 +29,9 @@ acl "internal" {
|
||||||
};
|
};
|
||||||
|
|
||||||
// the ip of the slaves generated by alternc
|
// the ip of the slaves generated by alternc
|
||||||
include "/var/alternc/bind/slaveip.conf";
|
include "/var/lib/alternc/bind/slaveip.conf";
|
||||||
|
|
||||||
include "/etc/bind/rndc.key";
|
include "/etc/bind/rndc.key";
|
||||||
|
|
||||||
// the zones generated by the users
|
// the zones generated by the users
|
||||||
include "/var/alternc/bind/automatic.conf";
|
include "/var/lib/alternc/bind/automatic.conf";
|
||||||
|
|
|
@ -14,8 +14,7 @@ for CONFIG_FILE in \
|
||||||
. "$CONFIG_FILE"
|
. "$CONFIG_FILE"
|
||||||
done
|
done
|
||||||
|
|
||||||
#FIXME: should be define in local.sh
|
# ALTERNC_LOGS is from local.sh
|
||||||
ALTERNC_LOGS="$ALTERNC_LOC/logs"
|
|
||||||
|
|
||||||
#Compress logs older than XX days
|
#Compress logs older than XX days
|
||||||
nice -n 10 find "$ALTERNC_LOGS" -type f -name '*.log' -mtime +$DAYS -exec gzip '{}' \;
|
nice -n 10 find "$ALTERNC_LOGS" -type f -name '*.log' -mtime +$DAYS -exec gzip '{}' \;
|
||||||
|
|
|
@ -14,7 +14,6 @@ for CONFIG_FILE in \
|
||||||
. "$CONFIG_FILE"
|
. "$CONFIG_FILE"
|
||||||
done
|
done
|
||||||
|
|
||||||
# FIXME this var should be define in local.sh
|
# ALTERNC_LOGS is from local.sh
|
||||||
ALTERNC_LOGS="$ALTERNC_LOC/logs"
|
|
||||||
|
|
||||||
nice 10 -n find "$ALTERNC_LOGS" -mtime +$DAYS -delete
|
nice 10 -n find "$ALTERNC_LOGS" -mtime +$DAYS -delete
|
||||||
|
|
|
@ -8,10 +8,10 @@
|
||||||
# Init some other vars
|
# Init some other vars
|
||||||
ZONE_TEMPLATE="/etc/alternc/templates/bind/templates/zone.template"
|
ZONE_TEMPLATE="/etc/alternc/templates/bind/templates/zone.template"
|
||||||
NAMED_TEMPLATE="/etc/alternc/templates/bind/templates/named.template"
|
NAMED_TEMPLATE="/etc/alternc/templates/bind/templates/named.template"
|
||||||
NAMED_CONF="/var/alternc/bind/automatic.conf"
|
NAMED_CONF="/var/lib/alternc/bind/automatic.conf"
|
||||||
|
|
||||||
dns_zone_file() {
|
dns_zone_file() {
|
||||||
echo "$ALTERNC_LOC/bind/zones/$1"
|
echo "/var/lib/alternc/bind/zones/$1"
|
||||||
}
|
}
|
||||||
|
|
||||||
dns_is_locked() {
|
dns_is_locked() {
|
||||||
|
|
|
@ -5,8 +5,8 @@
|
||||||
TEMPLATE_DIR="/etc/alternc/templates/apache2"
|
TEMPLATE_DIR="/etc/alternc/templates/apache2"
|
||||||
HOSTING_DIR="/etc/alternc/functions_hosting"
|
HOSTING_DIR="/etc/alternc/functions_hosting"
|
||||||
|
|
||||||
HTML_HOME="$ALTERNC_LOC/html"
|
HTML_HOME="$ALTERNC_HTML"
|
||||||
VHOST_DIR="$ALTERNC_LOC/apache-vhost"
|
VHOST_DIR="/var/lib/alternc/apache-vhost"
|
||||||
|
|
||||||
launch_hooks() {
|
launch_hooks() {
|
||||||
local ACTION=$1
|
local ACTION=$1
|
||||||
|
|
|
@ -32,7 +32,7 @@ echo $QUOTA_PART
|
||||||
if [ -z "$QUOTA_PART" ]; then
|
if [ -z "$QUOTA_PART" ]; then
|
||||||
`sudo $QUOTA -r -g $MID $SIZE $SIZE 0 0 $DATA_PART 2>/dev/null || echo "Group quota are not enabled on $ALTERNC_HTML." >&2`
|
`sudo $QUOTA -r -g $MID $SIZE $SIZE 0 0 $DATA_PART 2>/dev/null || echo "Group quota are not enabled on $ALTERNC_HTML." >&2`
|
||||||
else
|
else
|
||||||
`sudo $QUOTA -r -g $MID $SIZE $SIZE 0 0 "$ALTERNC_LOC/html" 2>/dev/null || echo "Group quota are not enabled on $ALTERNC_HTML." >&2`
|
`sudo $QUOTA -r -g $MID $SIZE $SIZE 0 0 "$ALTERNC_HTML" 2>/dev/null || echo "Group quota are not enabled on $ALTERNC_HTML." >&2`
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ command -v $QUOTA >/dev/null || { echo "Quotas uninstalled"; exit 0; }
|
||||||
# the bigger one, and if someone separate it we need to look this one
|
# the bigger one, and if someone separate it we need to look this one
|
||||||
# particulary. It should be interesting to cumulate quota of all mounted directory.
|
# particulary. It should be interesting to cumulate quota of all mounted directory.
|
||||||
|
|
||||||
DATA_PART=`$DF "${ALTERNC_LOC}/html" 2>/dev/null | $AWK 'NR==2 { print $1 }'`
|
DATA_PART=`$DF "${ALTERNC_HTML}" 2>/dev/null | $AWK 'NR==2 { print $1 }'`
|
||||||
|
|
||||||
# quota will give over NFS will print the partition using the full NFS name
|
# quota will give over NFS will print the partition using the full NFS name
|
||||||
# (e.g. 10.0.0.1:/var/www/alternc) so we need to lookup first with mount
|
# (e.g. 10.0.0.1:/var/www/alternc) so we need to lookup first with mount
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
FLAGFILE="/var/run/alternc/refresh_slave";
|
FLAGFILE="/var/run/alternc/refresh_slave";
|
||||||
TPL="/etc/alternc/templates/bind/slaveip.conf"
|
TPL="/etc/alternc/templates/bind/slaveip.conf"
|
||||||
TARGET="/var/alternc/bind/slaveip.conf"
|
TARGET="/var/lib/alternc/bind/slaveip.conf"
|
||||||
TMP=$(mktemp /tmp/slaveip.conf.XXXX)
|
TMP=$(mktemp /tmp/slaveip.conf.XXXX)
|
||||||
|
|
||||||
if [ ! -e "$FLAGFILE" ] ; then
|
if [ ! -e "$FLAGFILE" ] ; then
|
||||||
|
|
|
@ -16,7 +16,7 @@ done
|
||||||
|
|
||||||
# Some vars
|
# Some vars
|
||||||
umask 022
|
umask 022
|
||||||
LOCK_FILE="$ALTERNC_LOC/bureau/cron.lock"
|
LOCK_FILE="/usr/share/alternc/panel/cron.lock" # FIXME doesn't seem clean to be here
|
||||||
OLDIFS="$IFS"
|
OLDIFS="$IFS"
|
||||||
NEWIFS=" "
|
NEWIFS=" "
|
||||||
LOGFORMAT_FILE="/etc/alternc/apache_logformat.conf"
|
LOGFORMAT_FILE="/etc/alternc/apache_logformat.conf"
|
||||||
|
|
|
@ -20,7 +20,7 @@ if [ $# -eq 1 ];then
|
||||||
else
|
else
|
||||||
#Fist we set the quotas no 0 (infinite for each already existing account
|
#Fist we set the quotas no 0 (infinite for each already existing account
|
||||||
t=`mysql_query "UPDATE mailbox SET quota='0' WHERE quota IS NULL"`
|
t=`mysql_query "UPDATE mailbox SET quota='0' WHERE quota IS NULL"`
|
||||||
d=`find "$ALTERNC_LOC/mail/" -maxdepth 2 -mindepth 2 -type d`
|
d=`find "$ALTERNC_MAIL/" -maxdepth 2 -mindepth 2 -type d`
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue