diff --git a/debian/alternc.dirs b/debian/alternc.dirs index 06d3d570..e8ed5241 100644 --- a/debian/alternc.dirs +++ b/debian/alternc.dirs @@ -16,17 +16,15 @@ usr/lib/alternc/install.d usr/sbin usr/share/alternc/install 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/db var/alternc/exec.usr var/alternc/mla var/alternc/sessions var/alternc/tmp -var/alternc/logs var/backups/alternc +/var/lib/alternc/apache-vhost +/var/lib/alternc/bind +/var/lib/alternc/bind/zones var/log/alternc var/run/alternc diff --git a/debian/alternc.postinst b/debian/alternc.postinst index 4ed9c0c3..bf32b49c 100644 --- a/debian/alternc.postinst +++ b/debian/alternc.postinst @@ -245,9 +245,9 @@ EOF #find /var/alternc/dns/ -type l -lname /var/alternc/bureau -exec rm {} \; # Bind stuff - touch /var/alternc/bind/automatic.conf /var/alternc/bind/slaveip.conf - chown root:bind /var/alternc/bind/automatic.conf /var/alternc/bind/slaveip.conf - chmod 640 /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/lib/alternc/bind/automatic.conf /var/lib/alternc/bind/slaveip.conf + chmod 640 /var/lib/alternc/bind/automatic.conf /var/lib/alternc/bind/slaveip.conf touch /var/run/alternc/refresh_slave /usr/lib/alternc/slave_dns # Apache will not start without this file diff --git a/etc/alternc/templates/bind/named.conf.options b/etc/alternc/templates/bind/named.conf.options index b647f023..68845ef7 100644 --- a/etc/alternc/templates/bind/named.conf.options +++ b/etc/alternc/templates/bind/named.conf.options @@ -29,9 +29,9 @@ acl "internal" { }; // 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"; // the zones generated by the users -include "/var/alternc/bind/automatic.conf"; +include "/var/lib/alternc/bind/automatic.conf"; diff --git a/src/compress_logs.sh b/src/compress_logs.sh index 487d54b5..925bc6db 100644 --- a/src/compress_logs.sh +++ b/src/compress_logs.sh @@ -14,8 +14,7 @@ for CONFIG_FILE in \ . "$CONFIG_FILE" done -#FIXME: should be define in local.sh -ALTERNC_LOGS="$ALTERNC_LOC/logs" +# ALTERNC_LOGS is from local.sh #Compress logs older than XX days nice -n 10 find "$ALTERNC_LOGS" -type f -name '*.log' -mtime +$DAYS -exec gzip '{}' \; diff --git a/src/delete_logs.sh b/src/delete_logs.sh index 835eb8a1..4feecaa8 100644 --- a/src/delete_logs.sh +++ b/src/delete_logs.sh @@ -14,7 +14,6 @@ for CONFIG_FILE in \ . "$CONFIG_FILE" done -# FIXME this var should be define in local.sh -ALTERNC_LOGS="$ALTERNC_LOC/logs" +# ALTERNC_LOGS is from local.sh nice 10 -n find "$ALTERNC_LOGS" -mtime +$DAYS -delete diff --git a/src/functions_dns.sh b/src/functions_dns.sh index 104e6096..3cf21019 100755 --- a/src/functions_dns.sh +++ b/src/functions_dns.sh @@ -8,10 +8,10 @@ # Init some other vars ZONE_TEMPLATE="/etc/alternc/templates/bind/templates/zone.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() { - echo "$ALTERNC_LOC/bind/zones/$1" + echo "/var/lib/alternc/bind/zones/$1" } dns_is_locked() { diff --git a/src/functions_hosting.sh b/src/functions_hosting.sh index 70d46857..24182ba2 100644 --- a/src/functions_hosting.sh +++ b/src/functions_hosting.sh @@ -5,8 +5,8 @@ TEMPLATE_DIR="/etc/alternc/templates/apache2" HOSTING_DIR="/etc/alternc/functions_hosting" -HTML_HOME="$ALTERNC_LOC/html" -VHOST_DIR="$ALTERNC_LOC/apache-vhost" +HTML_HOME="$ALTERNC_HTML" +VHOST_DIR="/var/lib/alternc/apache-vhost" launch_hooks() { local ACTION=$1 diff --git a/src/quota_edit b/src/quota_edit index ac0778bc..771bfe2e 100755 --- a/src/quota_edit +++ b/src/quota_edit @@ -32,7 +32,7 @@ echo $QUOTA_PART 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` 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 diff --git a/src/quota_get b/src/quota_get index 0b30bac8..87a2be67 100755 --- a/src/quota_get +++ b/src/quota_get @@ -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 # 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 # (e.g. 10.0.0.1:/var/www/alternc) so we need to lookup first with mount diff --git a/src/slave_dns b/src/slave_dns index 3be3d32f..b170dc4d 100644 --- a/src/slave_dns +++ b/src/slave_dns @@ -5,7 +5,7 @@ FLAGFILE="/var/run/alternc/refresh_slave"; 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) if [ ! -e "$FLAGFILE" ] ; then diff --git a/src/update_domains.sh b/src/update_domains.sh index 42e603c3..524c3757 100644 --- a/src/update_domains.sh +++ b/src/update_domains.sh @@ -16,7 +16,7 @@ done # Some vars 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" NEWIFS=" " LOGFORMAT_FILE="/etc/alternc/apache_logformat.conf" diff --git a/src/update_quota_mail.sh b/src/update_quota_mail.sh index b77ccc94..0e3f12d4 100755 --- a/src/update_quota_mail.sh +++ b/src/update_quota_mail.sh @@ -20,7 +20,7 @@ if [ $# -eq 1 ];then else #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"` - d=`find "$ALTERNC_LOC/mail/" -maxdepth 2 -mindepth 2 -type d` + d=`find "$ALTERNC_MAIL/" -maxdepth 2 -mindepth 2 -type d` fi