typos and comment and removing of french in alternc.config

This commit is contained in:
Benjamin Sonntag 2014-04-03 10:51:04 +02:00
parent 7b7a87515a
commit 8e1fb4145b
2 changed files with 18 additions and 24 deletions

View File

@ -1 +1 @@
30 4 * * * root /usr/lib/alternc/alternc-awstats
30 4 * * * root /usr/lib/alternc/alternc-awstats

40
debian/alternc.config vendored
View File

@ -1,14 +1,11 @@
#!/bin/bash
set -e
#!/bin/bash -e
# Source debconf library.
. /usr/share/debconf/confmodule
db_capb backup
#Return if everything is good, exit error number otherwise
# Validate an IPv4 address.
function valid_ip()
{
local ip=$1
@ -27,7 +24,7 @@ function valid_ip()
}
#checking mysql connectivity and updating local.sh variables accordingly
# Checking mysql connectivity and updating local.sh environment variables accordingly
check_mysql()
{
STATE=0
@ -68,12 +65,9 @@ check_mysql()
done
}
# Return the deepest existing directory in a path
function get_first_existing_dir()
{
# Prend en premier parametre un chemin
# Retourne le répertoire parent existant le plus "proche"
# Exemple: on lui donne /var/www/alternc/gerard/dupont/ mais
# seul /var/www/alternc existe, ca répond /var/www/alternc
dir="$1"
if [ -z "$dir" ] ; then
return 0
@ -86,7 +80,7 @@ function get_first_existing_dir()
}
# default values for local.sh
# Compute default values for local.sh
MYSQL_HOST=127.0.0.1
MYSQL_DATABASE=alternc
MYSQL_USER=sysusr
@ -114,6 +108,8 @@ while [ "$QUEST_STATE" != 0 -a "$QUEST_STATE" != 14 ]; do
if [ -r /etc/alternc/local.sh ]; then
# source the current config
. /etc/alternc/local.sh
# and push it into debconf (its values have priority over anything
fi
# upgrade <= 3.0 to >= 3.1
if [ "x$ALTERNC_LOC" != "x" ]; then
@ -121,7 +117,7 @@ while [ "$QUEST_STATE" != 0 -a "$QUEST_STATE" != 14 ]; do
ALTERNC_MAIL="$ALTERNC_LOC/mail"
fi
#We ask for the hosting name and the FQDN
# We ask for the hosting name and the FQDN
db_get alternc/hostingname
if [ -z "$RET" ]; then
db_set alternc/hostingname "$HOSTING"
@ -135,13 +131,12 @@ while [ "$QUEST_STATE" != 0 -a "$QUEST_STATE" != 14 ]; do
db_set alternc/desktopname "$FQDN"
db_input high alternc/desktopname || true
fi
# Be sure that the FQDN is lowercase (Bug #1405)
# Ensure that the FQDN is lowercase (Fixes #1405)
db_get alternc/desktopname
db_set alternc/desktopname "`echo $RET | tr '[:upper:]' '[:lower:]'`"
# End bug #1405
;;
3)
#we ask for the public and private ip
# Ask for the public and private ip
db_get alternc/public_ip
if [ -z "$RET" ]; then
db_set alternc/public_ip "$PUBLIC_IP"
@ -172,7 +167,7 @@ while [ "$QUEST_STATE" != 0 -a "$QUEST_STATE" != 14 ]; do
done
;;
4)
#private IP
# Private IP
db_get alternc/internal_ip
if [ -z "$RET" ]; then
db_set alternc/internal_ip "$INTERNAL_IP"
@ -190,7 +185,7 @@ while [ "$QUEST_STATE" != 0 -a "$QUEST_STATE" != 14 ]; do
done
;;
5)
#We ask for the DNS server for the ip
# Ask for the DNS servers
db_get alternc/ns1
if [ -z "$RET" ]; then
db_set alternc/ns1 "$NS1_HOSTNAME"
@ -225,7 +220,7 @@ while [ "$QUEST_STATE" != 0 -a "$QUEST_STATE" != 14 ]; do
10)
db_get alternc/use_remote_mysql
if [ "$RET" == "true" ]; then
# user want to use a remote server
# User want to use a remote server
check_mysql
fi
;;
@ -240,10 +235,10 @@ while [ "$QUEST_STATE" != 0 -a "$QUEST_STATE" != 14 ]; do
db_get alternc/alternc_html
ALTERNC_HTML="$RET"
#checking acl and quota activation.
# Checking acl and quota activation.
basedir=`get_first_existing_dir "$ALTERNC_HTML"`;
MOUNT_POINT=$(df -P ${basedir} | tail -n 1 | awk '{print $6}')
#we get the first existing dir
# Get the first existing dir
aclcheckfile="$basedir/test-acl"
touch "$aclcheckfile"
setfacl -m u:root:rwx "$aclcheckfile" 2>/dev/null || (
@ -259,7 +254,6 @@ while [ "$QUEST_STATE" != 0 -a "$QUEST_STATE" != 14 ]; do
if [ -z "$RET" ]; then
db_input critical alternc/quotauninstalled || true
db_go
#db_reset alternc/quotauninstalled || true
db_set alternc/quotauninstalled "false" || true
fi
)
@ -323,8 +317,8 @@ if [ -z "$RET" ]; then
db_set alternc/mysql/host "$MYSQL_HOST"
fi
#Even if we asked the question concerning the database earlier in the process
#those calls are needed to pass the variable of remote sql server to AlternC
# Even if we asked the question concerning the database earlier in the process
# Those calls are needed to pass the variable of remote sql server to AlternC
db_get alternc/mysql/db
if [ -z "$RET" ]; then
db_set alternc/mysql/db "$MYSQL_DATABASE"