typos and comment and removing of french in alternc.config
This commit is contained in:
parent
7b7a87515a
commit
8e1fb4145b
|
@ -1 +1 @@
|
||||||
30 4 * * * root /usr/lib/alternc/alternc-awstats
|
30 4 * * * root /usr/lib/alternc/alternc-awstats
|
||||||
|
|
|
@ -1,14 +1,11 @@
|
||||||
#!/bin/bash
|
#!/bin/bash -e
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
# Source debconf library.
|
# Source debconf library.
|
||||||
. /usr/share/debconf/confmodule
|
. /usr/share/debconf/confmodule
|
||||||
|
|
||||||
db_capb backup
|
db_capb backup
|
||||||
|
|
||||||
|
# Validate an IPv4 address.
|
||||||
#Return if everything is good, exit error number otherwise
|
|
||||||
function valid_ip()
|
function valid_ip()
|
||||||
{
|
{
|
||||||
local ip=$1
|
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()
|
check_mysql()
|
||||||
{
|
{
|
||||||
STATE=0
|
STATE=0
|
||||||
|
@ -68,12 +65,9 @@ check_mysql()
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Return the deepest existing directory in a path
|
||||||
function get_first_existing_dir()
|
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"
|
dir="$1"
|
||||||
if [ -z "$dir" ] ; then
|
if [ -z "$dir" ] ; then
|
||||||
return 0
|
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_HOST=127.0.0.1
|
||||||
MYSQL_DATABASE=alternc
|
MYSQL_DATABASE=alternc
|
||||||
MYSQL_USER=sysusr
|
MYSQL_USER=sysusr
|
||||||
|
@ -114,6 +108,8 @@ while [ "$QUEST_STATE" != 0 -a "$QUEST_STATE" != 14 ]; do
|
||||||
if [ -r /etc/alternc/local.sh ]; then
|
if [ -r /etc/alternc/local.sh ]; then
|
||||||
# source the current config
|
# source the current config
|
||||||
. /etc/alternc/local.sh
|
. /etc/alternc/local.sh
|
||||||
|
# and push it into debconf (its values have priority over anything
|
||||||
|
|
||||||
fi
|
fi
|
||||||
# upgrade <= 3.0 to >= 3.1
|
# upgrade <= 3.0 to >= 3.1
|
||||||
if [ "x$ALTERNC_LOC" != "x" ]; then
|
if [ "x$ALTERNC_LOC" != "x" ]; then
|
||||||
|
@ -121,7 +117,7 @@ while [ "$QUEST_STATE" != 0 -a "$QUEST_STATE" != 14 ]; do
|
||||||
ALTERNC_MAIL="$ALTERNC_LOC/mail"
|
ALTERNC_MAIL="$ALTERNC_LOC/mail"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#We ask for the hosting name and the FQDN
|
# We ask for the hosting name and the FQDN
|
||||||
db_get alternc/hostingname
|
db_get alternc/hostingname
|
||||||
if [ -z "$RET" ]; then
|
if [ -z "$RET" ]; then
|
||||||
db_set alternc/hostingname "$HOSTING"
|
db_set alternc/hostingname "$HOSTING"
|
||||||
|
@ -135,13 +131,12 @@ while [ "$QUEST_STATE" != 0 -a "$QUEST_STATE" != 14 ]; do
|
||||||
db_set alternc/desktopname "$FQDN"
|
db_set alternc/desktopname "$FQDN"
|
||||||
db_input high alternc/desktopname || true
|
db_input high alternc/desktopname || true
|
||||||
fi
|
fi
|
||||||
# Be sure that the FQDN is lowercase (Bug #1405)
|
# Ensure that the FQDN is lowercase (Fixes #1405)
|
||||||
db_get alternc/desktopname
|
db_get alternc/desktopname
|
||||||
db_set alternc/desktopname "`echo $RET | tr '[:upper:]' '[:lower:]'`"
|
db_set alternc/desktopname "`echo $RET | tr '[:upper:]' '[:lower:]'`"
|
||||||
# End bug #1405
|
|
||||||
;;
|
;;
|
||||||
3)
|
3)
|
||||||
#we ask for the public and private ip
|
# Ask for the public and private ip
|
||||||
db_get alternc/public_ip
|
db_get alternc/public_ip
|
||||||
if [ -z "$RET" ]; then
|
if [ -z "$RET" ]; then
|
||||||
db_set alternc/public_ip "$PUBLIC_IP"
|
db_set alternc/public_ip "$PUBLIC_IP"
|
||||||
|
@ -172,7 +167,7 @@ while [ "$QUEST_STATE" != 0 -a "$QUEST_STATE" != 14 ]; do
|
||||||
done
|
done
|
||||||
;;
|
;;
|
||||||
4)
|
4)
|
||||||
#private IP
|
# Private IP
|
||||||
db_get alternc/internal_ip
|
db_get alternc/internal_ip
|
||||||
if [ -z "$RET" ]; then
|
if [ -z "$RET" ]; then
|
||||||
db_set alternc/internal_ip "$INTERNAL_IP"
|
db_set alternc/internal_ip "$INTERNAL_IP"
|
||||||
|
@ -190,7 +185,7 @@ while [ "$QUEST_STATE" != 0 -a "$QUEST_STATE" != 14 ]; do
|
||||||
done
|
done
|
||||||
;;
|
;;
|
||||||
5)
|
5)
|
||||||
#We ask for the DNS server for the ip
|
# Ask for the DNS servers
|
||||||
db_get alternc/ns1
|
db_get alternc/ns1
|
||||||
if [ -z "$RET" ]; then
|
if [ -z "$RET" ]; then
|
||||||
db_set alternc/ns1 "$NS1_HOSTNAME"
|
db_set alternc/ns1 "$NS1_HOSTNAME"
|
||||||
|
@ -225,7 +220,7 @@ while [ "$QUEST_STATE" != 0 -a "$QUEST_STATE" != 14 ]; do
|
||||||
10)
|
10)
|
||||||
db_get alternc/use_remote_mysql
|
db_get alternc/use_remote_mysql
|
||||||
if [ "$RET" == "true" ]; then
|
if [ "$RET" == "true" ]; then
|
||||||
# user want to use a remote server
|
# User want to use a remote server
|
||||||
check_mysql
|
check_mysql
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
@ -240,10 +235,10 @@ while [ "$QUEST_STATE" != 0 -a "$QUEST_STATE" != 14 ]; do
|
||||||
db_get alternc/alternc_html
|
db_get alternc/alternc_html
|
||||||
|
|
||||||
ALTERNC_HTML="$RET"
|
ALTERNC_HTML="$RET"
|
||||||
#checking acl and quota activation.
|
# Checking acl and quota activation.
|
||||||
basedir=`get_first_existing_dir "$ALTERNC_HTML"`;
|
basedir=`get_first_existing_dir "$ALTERNC_HTML"`;
|
||||||
MOUNT_POINT=$(df -P ${basedir} | tail -n 1 | awk '{print $6}')
|
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"
|
aclcheckfile="$basedir/test-acl"
|
||||||
touch "$aclcheckfile"
|
touch "$aclcheckfile"
|
||||||
setfacl -m u:root:rwx "$aclcheckfile" 2>/dev/null || (
|
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
|
if [ -z "$RET" ]; then
|
||||||
db_input critical alternc/quotauninstalled || true
|
db_input critical alternc/quotauninstalled || true
|
||||||
db_go
|
db_go
|
||||||
#db_reset alternc/quotauninstalled || true
|
|
||||||
db_set alternc/quotauninstalled "false" || true
|
db_set alternc/quotauninstalled "false" || true
|
||||||
fi
|
fi
|
||||||
)
|
)
|
||||||
|
@ -323,8 +317,8 @@ if [ -z "$RET" ]; then
|
||||||
db_set alternc/mysql/host "$MYSQL_HOST"
|
db_set alternc/mysql/host "$MYSQL_HOST"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#Even if we asked the question concerning the database earlier in the process
|
# 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
|
# Those calls are needed to pass the variable of remote sql server to AlternC
|
||||||
db_get alternc/mysql/db
|
db_get alternc/mysql/db
|
||||||
if [ -z "$RET" ]; then
|
if [ -z "$RET" ]; then
|
||||||
db_set alternc/mysql/db "$MYSQL_DATABASE"
|
db_set alternc/mysql/db "$MYSQL_DATABASE"
|
||||||
|
|
Loading…
Reference in New Issue