| 1 | #!/bin/sh |
|---|
| 2 | # |
|---|
| 3 | # AlternC Main install script. |
|---|
| 4 | # This script should be launched only once, when installing AlternC |
|---|
| 5 | # on a new server. THIS SCRIPT ERASE ALL DATA ON THE AlternC SYSTEM !! |
|---|
| 6 | # YOU HAVE BEEN WARNED ! |
|---|
| 7 | |
|---|
| 8 | # This script now assumes it has MySQL connectivity through |
|---|
| 9 | # /etc/alternc/my.cnf |
|---|
| 10 | |
|---|
| 11 | set -e |
|---|
| 12 | |
|---|
| 13 | for i in $*; do |
|---|
| 14 | case "$i" in |
|---|
| 15 | -f|--force) |
|---|
| 16 | force=1; shift;; |
|---|
| 17 | -s|--slave) |
|---|
| 18 | slave=1; shift;; |
|---|
| 19 | --) |
|---|
| 20 | break;; |
|---|
| 21 | *) |
|---|
| 22 | echo "unknown option $i"; shift;; |
|---|
| 23 | esac |
|---|
| 24 | done |
|---|
| 25 | |
|---|
| 26 | . /usr/lib/alternc/functions.sh |
|---|
| 27 | |
|---|
| 28 | ####################################################################### |
|---|
| 29 | # Script configuration |
|---|
| 30 | # |
|---|
| 31 | |
|---|
| 32 | # Configuration template location |
|---|
| 33 | TEMPLATE_DIR="/etc/alternc/templates" |
|---|
| 34 | |
|---|
| 35 | # Find needed configuration files (without the initial '/') |
|---|
| 36 | # replace this one unconditionnally |
|---|
| 37 | CONFIG_FILES="etc/alternc/bureau.conf" |
|---|
| 38 | |
|---|
| 39 | if [ -e /etc/bind/named.conf ]; then |
|---|
| 40 | CONFIG_FILES="$CONFIG_FILES etc/bind/templates/zone.template |
|---|
| 41 | etc/bind/templates/named.template etc/bind/named.conf.options" |
|---|
| 42 | fi |
|---|
| 43 | if [ -d /etc/postfix ]; then |
|---|
| 44 | CONFIG_FILES="$CONFIG_FILES etc/postfix/myalias.cf etc/postfix/myrelay.cf |
|---|
| 45 | etc/postfix/mydomain.cf etc/postfix/mygid.cf etc/postfix/myquota.cf |
|---|
| 46 | etc/postfix/myvirtual.cf etc/postfix/sasl/smtpd.conf" |
|---|
| 47 | fi |
|---|
| 48 | if [ -e /etc/proftpd/proftpd.conf ]; then |
|---|
| 49 | CONFIG_FILES="$CONFIG_FILES etc/proftpd/proftpd.conf etc/proftpd/welcome.msg etc/proftpd/modules.conf" |
|---|
| 50 | fi |
|---|
| 51 | if [ -e /etc/squirrelmail/apache.conf ]; then |
|---|
| 52 | CONFIG_FILES="$CONFIG_FILES etc/squirrelmail/apache.conf" |
|---|
| 53 | fi |
|---|
| 54 | |
|---|
| 55 | if [ -e /etc/default/saslauthd ]; then |
|---|
| 56 | CONFIG_FILES="$CONFIG_FILES etc/default/saslauthd" |
|---|
| 57 | fi |
|---|
| 58 | |
|---|
| 59 | if [ -e /etc/dovecot/dovecot.conf ]; then |
|---|
| 60 | CONFIG_FILES="$CONFIG_FILES etc/dovecot/dovecot.conf etc/dovecot/dovecot-sql.conf etc/dovecot/dovecot-dict-quota.conf" |
|---|
| 61 | fi |
|---|
| 62 | |
|---|
| 63 | INSTALLED_CONFIG_TAR="/var/backups/alternc/etc-installed.tar.gz" |
|---|
| 64 | |
|---|
| 65 | ####################################################################### |
|---|
| 66 | # Look for modified configuration files |
|---|
| 67 | # |
|---|
| 68 | if [ -f "$INSTALLED_CONFIG_TAR" ]; then |
|---|
| 69 | CHANGED="`env LANG=C tar -zdf "$INSTALLED_CONFIG_TAR" -C / 2> /dev/null | |
|---|
| 70 | grep -v 'postfix/main.cf' | grep -v 'Uid differs'|grep -v 'Gid differs' |grep -v 'Mode differs' | |
|---|
| 71 | sed -e 's/^\([^:]*\).*/ \1/' | sort -u`" |
|---|
| 72 | # " shutup emacs |
|---|
| 73 | if [ ! -z "$CHANGED" ]; then |
|---|
| 74 | echo "The following configuration files has changed since last AlternC" |
|---|
| 75 | echo "installation :" |
|---|
| 76 | echo "$CHANGED" |
|---|
| 77 | echo "" |
|---|
| 78 | if [ "$force" = "1" ]; then |
|---|
| 79 | echo "Replacing them as you requested." |
|---|
| 80 | else |
|---|
| 81 | echo "These configuration files should normally be modified by" |
|---|
| 82 | echo "changing the template in $TEMPLATE_DIR and then calling" |
|---|
| 83 | echo "$0 to perform the update." |
|---|
| 84 | echo "" |
|---|
| 85 | echo "Please examine the situation closely and call '$0 --force'" |
|---|
| 86 | echo "if you still want to actually overwrite these files." |
|---|
| 87 | exit 1 |
|---|
| 88 | fi |
|---|
| 89 | fi |
|---|
| 90 | fi |
|---|
| 91 | |
|---|
| 92 | ####################################################################### |
|---|
| 93 | # Prepare template expansions |
|---|
| 94 | # |
|---|
| 95 | |
|---|
| 96 | . /etc/alternc/local.sh |
|---|
| 97 | |
|---|
| 98 | # Check ACL |
|---|
| 99 | aclcheckfile="$ALTERNC_LOC/test-acl" |
|---|
| 100 | touch "$aclcheckfile" |
|---|
| 101 | setfacl -m u:root:rwx "$aclcheckfile" 2>/dev/null || ( echo "Error : ACL aren't activated on $ALTERNC_LOC . AlternC can't work without it." ; exit 2) |
|---|
| 102 | |
|---|
| 103 | # XXX: copy-paste from debian/config |
|---|
| 104 | if [ -r /etc/alternc/my.cnf ]; then |
|---|
| 105 | # make mysql configuration available as shell variables |
|---|
| 106 | # to convert from .cnf to shell syntax, we: |
|---|
| 107 | # * match only lines with "equal" in them (/=/) |
|---|
| 108 | # * remove whitespace around the = and add a left quote operator ' (;s) |
|---|
| 109 | # * add a right quote operator at the end of line (;s) |
|---|
| 110 | # * convert mysql variables into our MYSQL_ naming convention (;s) |
|---|
| 111 | # * print the result (;p) |
|---|
| 112 | eval `sed -n -e "/=/{s/ *= *\"\?/='/;s/\"\?\$/'/;s/host/MYSQL_HOST/;s/user/MYSQL_USER/;s/password/MYSQL_PASS/;s/database/MYSQL_DATABASE/;p}" /etc/alternc/my.cnf` |
|---|
| 113 | chown root:alterncpanel /etc/alternc/my.cnf |
|---|
| 114 | chmod 640 /etc/alternc/my.cnf |
|---|
| 115 | fi |
|---|
| 116 | |
|---|
| 117 | if [ -r /etc/alternc/my_mail.cnf ]; then |
|---|
| 118 | # make mysql configuration available as shell variables |
|---|
| 119 | # to convert from .cnf to shell syntax, we: |
|---|
| 120 | # * match only lines with "equal" in them (/=/) |
|---|
| 121 | # * remove whitespace around the = and add a left quote operator ' (;s) |
|---|
| 122 | # * add a right quote operator at the end of line (;s) |
|---|
| 123 | # * convert mysql variables into our MYSQL_ naming convention (;s) |
|---|
| 124 | # * print the result (;p) |
|---|
| 125 | eval `sed -n -e "/=/{s/ *= *\"\?/='/;s/\"\?\$/'/;s/host/MYSQL_HOST/;s/user/MYSQL_MAIL_USER/;s/password/MYSQL_MAIL_PASS/;s/database/MYSQL_DATABASE/;p}" /etc/alternc/my_mail.cnf` |
|---|
| 126 | chown root:alterncpanel /etc/alternc/my_mail.cnf |
|---|
| 127 | chmod 640 /etc/alternc/my_mail.cnf |
|---|
| 128 | fi |
|---|
| 129 | |
|---|
| 130 | WARNING="WARNING: Do not edit this file, edit the one in /etc/alternc/templates and launch alternc.install again." |
|---|
| 131 | |
|---|
| 132 | VERSION="`dpkg -s alternc | sed -n -e 's/^Version: \(.*\)/\1/p'`" |
|---|
| 133 | |
|---|
| 134 | # /var/alternc/dns/d/www.example.com |
|---|
| 135 | FQDN_LETTER="`echo $FQDN | sed -e 's/.*\.\([^\.]\)[^\.]*\.[^\.]*$/\1/'`" |
|---|
| 136 | if [ "$FQDN_LETTER" = "$FQDN" ] |
|---|
| 137 | then |
|---|
| 138 | FQDN_LETTER="_" |
|---|
| 139 | fi |
|---|
| 140 | |
|---|
| 141 | NS2_IP=`perl -e "\\$h = (gethostbyname(\"$NS2_HOSTNAME\"))[4]; |
|---|
| 142 | @ip = unpack('C4', \\$h); |
|---|
| 143 | print join (\".\", @ip);"` |
|---|
| 144 | |
|---|
| 145 | if [ -z "$MONITOR_IP" ]; then |
|---|
| 146 | MONITOR_IP="127.0.0.1" |
|---|
| 147 | fi |
|---|
| 148 | |
|---|
| 149 | PUBLIC_IP_BEGIN=$(echo $PUBLIC_IP|cut -c 1) |
|---|
| 150 | |
|---|
| 151 | # XXX: I assume this is secure if /tmp is sticky (+t) |
|---|
| 152 | # we should have a better way to deal with templating, of course. |
|---|
| 153 | SED_SCRIPT=`mktemp` |
|---|
| 154 | cat > $SED_SCRIPT <<EOF |
|---|
| 155 | s\\%%hosting%%\\$HOSTING\\; |
|---|
| 156 | s\\%%fqdn%%\\$FQDN\\; |
|---|
| 157 | s\\%%public_ip%%\\$PUBLIC_IP\\; |
|---|
| 158 | s\\%%public_ip_begin%%\\$PUBLIC_IP_BEGIN\\; |
|---|
| 159 | s\\%%internal_ip%%\\$INTERNAL_IP\\; |
|---|
| 160 | s\\%%monitor_ip%%\\$MONITOR_IP\\; |
|---|
| 161 | s\\%%ns1%%\\$NS1_HOSTNAME\\; |
|---|
| 162 | s\\%%ns2%%\\$NS2_HOSTNAME\\; |
|---|
| 163 | s\\%%mx%%\\$DEFAULT_MX\\; |
|---|
| 164 | s\\%%dbhost%%\\$MYSQL_HOST\\; |
|---|
| 165 | s\\%%dbname%%\\$MYSQL_DATABASE\\; |
|---|
| 166 | s\\%%dbuser%%\\$MYSQL_USER\\; |
|---|
| 167 | s\\%%dbpwd%%\\$MYSQL_PASS\\; |
|---|
| 168 | s\\%%db_mail_user%%\\$MYSQL_MAIL_USER\\; |
|---|
| 169 | s\\%%db_mail_pwd%%\\$MYSQL_MAIL_PASS\\; |
|---|
| 170 | s\\%%ALTERNC_LOC%%\\$ALTERNC_LOC\\; |
|---|
| 171 | s\\%%warning_message%%\\$WARNING\\; |
|---|
| 172 | s\\%%fqdn_lettre%%\\$FQDN_LETTER\\; |
|---|
| 173 | s\\%%version%%\\$VERSION\\; |
|---|
| 174 | s\\%%ns2_ip%%\\$NS2_IP\\; |
|---|
| 175 | EOF |
|---|
| 176 | |
|---|
| 177 | ####################################################################### |
|---|
| 178 | # Backup configuration files |
|---|
| 179 | # |
|---|
| 180 | BACKUP_FILE="/var/backups/alternc/etc-original-`date +%Y%m%d-%H%M`.tar.gz" |
|---|
| 181 | |
|---|
| 182 | # Only backup what we are really going to replace |
|---|
| 183 | BACKUPS="" |
|---|
| 184 | for file in $CONFIG_FILES; do |
|---|
| 185 | TEMPLATE="$TEMPLATE_DIR/${file##etc/}" |
|---|
| 186 | if [ -f "$TEMPLATE" ]; then |
|---|
| 187 | BACKUPS="$BACKUPS $file" |
|---|
| 188 | fi |
|---|
| 189 | done |
|---|
| 190 | |
|---|
| 191 | # also backup main.cf since we're doing major changes to it |
|---|
| 192 | BACKUPS="$BACKUPS etc/postfix/main.cf" |
|---|
| 193 | tar -zcf "$BACKUP_FILE" -C / $BACKUPS 2>/dev/null || true |
|---|
| 194 | |
|---|
| 195 | ####################################################################### |
|---|
| 196 | # Expand templates in the right place |
|---|
| 197 | # |
|---|
| 198 | echo -n "Expanding variables in configuration files:" |
|---|
| 199 | for file in $CONFIG_FILES; do |
|---|
| 200 | TEMPLATE="$TEMPLATE_DIR/${file##etc/}" |
|---|
| 201 | echo -n " $file" |
|---|
| 202 | if [ -f "$TEMPLATE" ]; then |
|---|
| 203 | sed -f "$SED_SCRIPT" < $TEMPLATE > /$file |
|---|
| 204 | fi |
|---|
| 205 | done |
|---|
| 206 | echo "." |
|---|
| 207 | rm -f $SED_SCRIPT |
|---|
| 208 | |
|---|
| 209 | ######################################################################## |
|---|
| 210 | # Ad-hoc fixes |
|---|
| 211 | # |
|---|
| 212 | |
|---|
| 213 | php="`ls /usr/lib/apache*/*/*php*.so | sed -e 's/^.*libphp\(.\)\.so$/php\1/' | tail -1`" |
|---|
| 214 | ln -fs /etc/alternc/alternc.ini /etc/$php/conf.d/alternc.ini || true |
|---|
| 215 | if [ -x /usr/sbin/apache2 ]; then |
|---|
| 216 | s="" |
|---|
| 217 | if ! [ -L /etc/apache2/mods-enabled/vhost_alias.load ] |
|---|
| 218 | then |
|---|
| 219 | a2enmod vhost_alias |
|---|
| 220 | s="apache2" |
|---|
| 221 | fi |
|---|
| 222 | if ! [ -L /etc/apache2/mods-enabled/$php.load ] |
|---|
| 223 | then |
|---|
| 224 | a2enmod $php |
|---|
| 225 | fi |
|---|
| 226 | if ! [ -L /etc/apache2/mods-enabled/rewrite.load ] |
|---|
| 227 | then |
|---|
| 228 | a2enmod rewrite |
|---|
| 229 | fi |
|---|
| 230 | if [ -e /etc/alternc/apache.pem ]; then |
|---|
| 231 | # We enable proftpd tls module |
|---|
| 232 | cat /etc/proftpd/modules.conf | sed -e 's/^#LoadModule mod_tls.c/LoadModule mod_tls.c/' > /etc/proftpd/modules.conf.alternc-new |
|---|
| 233 | mv /etc/proftpd/modules.conf.alternc-new /etc/proftpd/modules.conf |
|---|
| 234 | cp /etc/proftpd/modules.conf /etc/alternc/templates/proftpd/ |
|---|
| 235 | # We enable apache2 SSL : |
|---|
| 236 | if [ ! -L /etc/apache2/mods-enabled/ssl.load ] ; then |
|---|
| 237 | a2enmod ssl |
|---|
| 238 | s="apache2" |
|---|
| 239 | fi |
|---|
| 240 | if [ ! -h /etc/apache2/conf.d/alternc-ssl.conf ] && [ -e /etc/apache2/conf.d/ ]; then |
|---|
| 241 | ln -sf /etc/alternc/apache2-ssl.conf /etc/apache2/conf.d/alternc-ssl.conf |
|---|
| 242 | s="apache2" |
|---|
| 243 | fi |
|---|
| 244 | else |
|---|
| 245 | # We disable proftpd tls module |
|---|
| 246 | cat /etc/proftpd/modules.conf | sed -e 's/^LoadModule mod_tls.c/#LoadModule mod_tls.c/' > /etc/proftpd/modules.conf.alternc-new |
|---|
| 247 | mv /etc/proftpd/modules.conf.alternc-new /etc/proftpd/modules.conf |
|---|
| 248 | cp /etc/proftpd/modules.conf /etc/alternc/templates/proftpd/ |
|---|
| 249 | echo "SSL not configured" |
|---|
| 250 | echo "create a certificate in /etc/alternc/apache.pem and rerun alternc.install" |
|---|
| 251 | fi |
|---|
| 252 | if [ ! -h /etc/apache2/conf.d/alternc.conf ] && [ -e /etc/apache2/conf.d/ ]; then |
|---|
| 253 | ln -sf /etc/alternc/apache2.conf /etc/apache2/conf.d/alternc.conf |
|---|
| 254 | s="apache2" |
|---|
| 255 | fi |
|---|
| 256 | if [ -e /etc/apache2/sites-enabled/000-default ]; then |
|---|
| 257 | a2dissite default |
|---|
| 258 | s="apache2" |
|---|
| 259 | fi |
|---|
| 260 | SERVICES="$SERVICES $s" |
|---|
| 261 | fi |
|---|
| 262 | |
|---|
| 263 | # Copy postfix *_checks if they do not exist |
|---|
| 264 | for file in body_checks header_checks; do |
|---|
| 265 | if [ ! -e "/etc/postfix/$file" ]; then |
|---|
| 266 | cp /usr/share/alternc/install/$file /etc/postfix |
|---|
| 267 | fi |
|---|
| 268 | done |
|---|
| 269 | |
|---|
| 270 | # Attribute the correct rights to critical postfix files |
|---|
| 271 | if [ -e /etc/postfix/myalias.cf -o -e /etc/postfix/mydomain.cf -o -e /etc/postfix/mygid.cf -o -e /etc/postfix/myvirtual.cf -o -e /etc/postfix/myrelay.cf -o -e /etc/postfix/myquota.cf ]; then |
|---|
| 272 | chown root:postfix /etc/postfix/my* |
|---|
| 273 | chmod 640 /etc/postfix/my* |
|---|
| 274 | fi |
|---|
| 275 | |
|---|
| 276 | if [ ! -f /etc/postfix/main.cf ] |
|---|
| 277 | then |
|---|
| 278 | echo "****************************************" |
|---|
| 279 | echo "POSTFIX is NOT configured properly" |
|---|
| 280 | echo "please launch dpkg-reconfigure -plow postfix" |
|---|
| 281 | echo "and choose 'Internet Site'" |
|---|
| 282 | echo "then reinstall alternc" |
|---|
| 283 | echo "****************************************" |
|---|
| 284 | exit 1 |
|---|
| 285 | fi |
|---|
| 286 | |
|---|
| 287 | # configure Postfix appropriatly for our needs |
|---|
| 288 | if [ "$slave" = "1" ]; then |
|---|
| 289 | postfix_conf=/etc/alternc/postfix-slave.cf |
|---|
| 290 | else |
|---|
| 291 | postfix_conf=/etc/alternc/postfix.cf |
|---|
| 292 | fi |
|---|
| 293 | while read line ; do |
|---|
| 294 | postconf -e "$line" |
|---|
| 295 | done < "$postfix_conf" |
|---|
| 296 | |
|---|
| 297 | # Conviguring delivery used bu Postfix FIXME change script name |
|---|
| 298 | echo `/usr/bin/postfix-add-policy dovecot pipe DRhu vmail:vmail '/usr/bin/sudo /usr/lib/dovecot/deliver -f ${sender} -d ${recipient} '` |
|---|
| 299 | |
|---|
| 300 | # Bug #1215: configure mydestination when $FQDN is not in |
|---|
| 301 | OLDDESTINATION=`postconf mydestination | awk -F '=' '{print $2}'` |
|---|
| 302 | echo "$OLDDESTINATION" | grep -q -v "$FQDN" && postconf -e "mydestination = $FQDN, $OLDDESTINATION" |
|---|
| 303 | |
|---|
| 304 | if [ -e /etc/proftpd.conf ] ; then |
|---|
| 305 | chmod 640 /etc/proftpd/proftpd.conf |
|---|
| 306 | fi |
|---|
| 307 | |
|---|
| 308 | if [ -x /usr/sbin/locale-gen ] ; then |
|---|
| 309 | touch /etc/locale.gen |
|---|
| 310 | LOCALECHANGED="" |
|---|
| 311 | # Add de_DE ISO-8859-1, en_US ISO-8859-1, es_ES ISO-8859-1, fr_FR ISO-8859-1 to the locales : |
|---|
| 312 | if ! grep -q "^de_DE ISO-8859-1$" /etc/locale.gen ; then |
|---|
| 313 | echo "de_DE ISO-8859-1" >>/etc/locale.gen |
|---|
| 314 | LOCALECHANGED=1 |
|---|
| 315 | fi |
|---|
| 316 | if ! grep -q "^en_US ISO-8859-1$" /etc/locale.gen ; then |
|---|
| 317 | echo "en_US ISO-8859-1" >>/etc/locale.gen |
|---|
| 318 | LOCALECHANGED=1 |
|---|
| 319 | fi |
|---|
| 320 | if ! grep -q "^es_ES ISO-8859-1$" /etc/locale.gen ; then |
|---|
| 321 | echo "es_ES ISO-8859-1" >>/etc/locale.gen |
|---|
| 322 | LOCALECHANGED=1 |
|---|
| 323 | fi |
|---|
| 324 | if ! grep -q "^fr_FR ISO-8859-1$" /etc/locale.gen ; then |
|---|
| 325 | echo "fr_FR ISO-8859-1" >>/etc/locale.gen |
|---|
| 326 | LOCALECHANGED=1 |
|---|
| 327 | fi |
|---|
| 328 | if [ "$LOCALECHANGED" ] ; then |
|---|
| 329 | locale-gen |
|---|
| 330 | fi |
|---|
| 331 | fi |
|---|
| 332 | |
|---|
| 333 | ####################################################################### |
|---|
| 334 | # Save installed files to check them during next install |
|---|
| 335 | # |
|---|
| 336 | tar -zcf "$INSTALLED_CONFIG_TAR" -C / $CONFIG_FILES |
|---|
| 337 | |
|---|
| 338 | ####################################################################### |
|---|
| 339 | # Reload services |
|---|
| 340 | # |
|---|
| 341 | for service in postfix bind9 dovecot cron proftpd; do |
|---|
| 342 | invoke-rc.d $service force-reload || true |
|---|
| 343 | done |
|---|
| 344 | |
|---|
| 345 | ####################################################################### |
|---|
| 346 | # Last touches |
|---|
| 347 | # |
|---|
| 348 | |
|---|
| 349 | chown alterncpanel:alterncpanel "$ALTERNC_LOC/html/"* |
|---|
| 350 | setfacl -b -k -m d:g:alterncpanel:rw- -m g:alterncpanel:rw- "$ALTERNC_LOC/html/"* |
|---|
| 351 | |
|---|
| 352 | # Creating admin user if needed |
|---|
| 353 | HAS_ROOT=`mysql --defaults-file=/etc/alternc/my.cnf -e "SELECT COUNT(*) FROM membres WHERE login = 'admin' OR login = 'root' and su = 1" | tail -1` |
|---|
| 354 | if [ "$HAS_ROOT" != "1" ]; then |
|---|
| 355 | echo "Creating admin user..." |
|---|
| 356 | echo "" |
|---|
| 357 | |
|---|
| 358 | if su - alterncpanel -s /bin/bash -c /usr/share/alternc/install/newone.php |
|---|
| 359 | then |
|---|
| 360 | echo "*******************************************" |
|---|
| 361 | echo "* *" |
|---|
| 362 | echo "* Admin account *" |
|---|
| 363 | echo "* ------------ *" |
|---|
| 364 | echo "* *" |
|---|
| 365 | echo "* user: admin password: admin *" |
|---|
| 366 | echo "* *" |
|---|
| 367 | echo "* Please change this as soon as possible! *" |
|---|
| 368 | echo "* *" |
|---|
| 369 | echo "*******************************************" |
|---|
| 370 | else |
|---|
| 371 | echo "Il a été impossible de créer un nouveau membre alternc. newone.php a retourné un code d'erreur $?. Vérifiez si la base MySQL, PHP, ainsi que le fichier local.sh sont bien configurés. Vérifiez aussi si des erreurs ne sont pas apparues plus haut dans l'installation." |
|---|
| 372 | fi |
|---|
| 373 | fi |
|---|
| 374 | |
|---|
| 375 | #giving vmail user read access on dovecot sql file |
|---|
| 376 | chgrp vmail /etc/dovecot/dovecot.conf |
|---|
| 377 | chmod g+r /etc/dovecot/dovecot.conf |
|---|
| 378 | |
|---|
| 379 | # Changing owner of web panel's files |
|---|
| 380 | chown -R alterncpanel:alterncpanel "$ALTERNC_LOC/bureau" |
|---|
| 381 | |
|---|
| 382 | # We force the re-computing of the DNS zones, since we may have changed the IP address (see #460) |
|---|
| 383 | /usr/bin/mysql --defaults-file="/etc/alternc/my.cnf" -B -e "update domaines set dns_action='update';" |
|---|
| 384 | |
|---|
| 385 | # We should restart apaches after all configuration stuff ... |
|---|
| 386 | for service in $SERVICES; do |
|---|
| 387 | test -x /etc/init.d/$service && invoke-rc.d $service stop || true |
|---|
| 388 | done |
|---|
| 389 | for service in $SERVICES; do |
|---|
| 390 | test -x /etc/init.d/$service && invoke-rc.d $service start || true |
|---|
| 391 | done |
|---|