[ PHPXref.com ] [ Generated: Sun Jul 20 18:16:01 2008 ] [ ISPConfig 2.2.1 ]
[ Index ]     [ Variables ]     [ Functions ]     [ Classes ]     [ Constants ]     [ Statistics ]

title

Body

[close]

/ -> setup2 (source)

   1  #!/bin/bash
   2  ###############################################################################
   3  # Copyright (c) 2005, projektfarm Gmbh, Till Brehm, Falko Timme
   4  # All rights reserved.
   5  #
   6  # Redistribution and use in source and binary forms, with or without modification,
   7  # are permitted provided that the following conditions are met:
   8  #
   9  #     * Redistributions of source code must retain the above copyright notice,
  10  #       this list of conditions and the following disclaimer.
  11  #     * Redistributions in binary form must reproduce the above copyright notice,
  12  #       this list of conditions and the following disclaimer in the documentation
  13  #       and/or other materials provided with the distribution.
  14  #     * Neither the name of ISPConfig nor the names of its contributors
  15  #       may be used to endorse or promote products derived from this software without
  16  #       specific prior written permission.
  17  #
  18  # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
  19  # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  20  # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  21  # IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
  22  # INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
  23  # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  24  # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
  25  # OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  26  # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
  27  # EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  28  ###############################################################################
  29  
  30  export PATH="/sbin:/usr/sbin:/usr/local/sbin:/root/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/libexec"
  31  
  32  log(){
  33    LOGFILE=/var/log/ispconfig_install.log
  34    echo `date` "- [ISPConfig] - "$1 >> $LOGFILE
  35  }
  36  
  37  error ()
  38  {
  39    log  "ERROR: $1"
  40    echo "ERROR: $1"
  41    rm -f dist.info*
  42    exit 1
  43  }
  44  
  45  caselog(){
  46    if [ $? != 0 ]; then
  47      log "WARNING: $2"
  48    else
  49      log "$1"
  50    fi
  51  }
  52  
  53  ID="id -u"
  54  MYUID=`$ID 2>/dev/null`
  55  
  56  if [ ! -z "$MYUID" ];
  57  then
  58    if [ $MYUID != 0 ];
  59    then
  60      error "Sie benötigen root-Rechte zum Ausführen dieses Skriptes! / You need root privileges to run this script! / Vous devez avoir les privileges root pour executer ce script!";
  61    fi
  62  fi
  63  
  64  . dist.info.tmp
  65  
  66  ############# INSTALLATIONSART #################
  67    if [ "$install_art" == "upgrade" ]; then
  68      echo "Upgrade einer existierenden ISPConfig-Installation. / Upgrading an existing ISPConfig installation. / Mise à jour d'une installation d'ISPConfig existante."
  69      log "Upgrade einer existierenden ISPConfig-Installation. / Upgrading an existing ISPConfig installation. / Mise à jour d'une installation d'ISPConfig existante."
  70      echo
  71      echo 'Das Upgrade wird von Ihnen geänderte Templates/Dateien von ISPConfig überspielen. Wenn Sie diese Dateien sichern möchten, sollten Sie jetzt eine zweite Shell öffnen, um ein Backup der betroffenen Dateien durchzuführen.'
  72      echo 'The upgrade will overwrite your manual changes to files/templates of ISPConfig. In order to save those files you should open a second shell to make a backup of the affected files.'
  73      echo 'En uppgradering kommer att skriva över manuella ändringar gjorda på filer/mallar i ISPConfig.För att spara dessa ändringar bör du öppna ett andra skal fönster för att göra en backup på berörda filer.'
  74      echo "Cette mise à jour va supprimer vos changements dans les fichiers des manuels/modeles d'ISPConfig. Pour sauvegarder ces fichiers vous devez ouvrir une seconde fenêtre shell et enregistrer les fichiers concernés."
  75      $dist_init_scripts/ispconfig_server stop
  76      log "ISPConfig server stopped"
  77    else
  78      echo "Neuinstallation eines ISPConfig-Systems. / Installation of a new ISPConfig system. / Installation d'ISPConfig sur un nouveau système."
  79      log "Neuinstallation eines ISPConfig-Systems. / Installation of a new ISPConfig system. / Installation d'ISPConfig sur un nouveau système."
  80    fi
  81  ############### INSTALLATIONSART ENDE ##########
  82  
  83  ############# SPRACHE ####################
  84    PS3='Ihre Wahl: / Your Choice: / Votre Choix:' # Sets the prompt string.
  85  
  86    echo 'Wählen Sie Ihre Sprache (deutsch/englisch/spanisch/französisch/italienisch/niederländisch/polnisch/schwedisch): / Please choose your language (German/English/Spanish/French/Italian/Dutch/Polish/Swedish):  / Merci de choisir votre langue (Allemand/Anglais/Espagnol/Français/Italien/Néerlandais/Polonais/Suédois):'
  87  
  88    select lang in "de" "en" "es" "fr" "it" "nl" "pl" "se"
  89    do
  90      echo
  91      break  # if no 'break' here, keeps looping forever.
  92    done
  93  
  94    while [ "$lang" != "de" -a "$lang" != "en" -a "$lang" != "es" -a "$lang" != "fr" -a "$lang" != "it" -a "$lang" != "nl" -a "$lang" != "pl" -a "$lang" != "se" ]
  95  do
  96      PS3='Ihre Wahl: / Your Choice: / Votre choix:' # Sets the prompt string.
  97  
  98    echo 'Wählen Sie Ihre Sprache (deutsch/englisch/französisch/italienisch/spanisch): / Please choose your language (German/English/French/Italian/Spanish):  / Merci de choisir votre langue (Allemand/Anglais/Français/Italien/Espagnol):'
  99  
 100    select lang in "de" "en" "es" "fr" "it" "nl" "pl" "se"
 101    do
 102      echo
 103      break  # if no 'break' here, keeps looping forever.
 104    done
 105  done
 106  
 107  log "selected language: "$lang
 108  
 109  if [ "$lang" == "de" ]; then
 110    q_hinweis="Bei der Installation auf Systemen, auf denen bereits Einstellungen vorgenommen wurden, werden einige System-Dateien ersetzt. Dies kann zum Verlust von Einträgen in httpd.conf, named.conf sowie in der Sendmail-Konfiguration führen."
 111    q_hinweis_akzeptieren="Wollen Sie mit der Installation fortfahren? [y/n]"
 112    q_lizenz="Lesen Sie sich die Lizenz sorgfältig durch:"
 113    q_lizenz_akzeptieren="Akzeptieren Sie die Lizenz? [y/n]"
 114    q_install_mode="Bitte wählen Sie den Installationsmodus. Im Expertenmodus werden Ihnen zusätzliche Fragen gestellt. Im Standardmodus werden für diese Fragen Standardwerte angenommen."
 115    q_select="Bitte wählen Sie: "
 116    q_wahl="Ihre Wahl: "
 117    q_anderer="anderer"
 118    q_korrekt="Ist das korrekt? [y/n]"
 119    q_mta_check="Checke, ob ein MTA installiert ist..."
 120    q_mta_pruefung1="ISPConfig hat den folgenden MTA gefunden:"
 121    q_wahl_mta="Bitte wählen Sie Ihren MTA aus: "
 122    q_error1="Ihre Systemkonfiguration ist nicht kompatibel zu ISPConfig! Die Installation bricht hier ab!"
 123    q_procmail_check="Checke, ob Paket procmail installiert ist..."
 124    q_quota_check="Checke, ob Paket quota installiert ist..."
 125    q_ftp_check="Checke, ob ein FTP-Server installiert ist..."
 126    q_ftp_pruefung1="ISPConfig hat den folgenden FTP-Server gefunden:"
 127    q_wahl_ftp="Bitte wählen Sie Ihren FTP-Server aus: "
 128    q_mysql_check="Checke, ob Paket MySQL installiert ist..."
 129    q_pop3_check="Checke, ob ein POP3-Server installiert ist..."
 130    q_pop3_pruefung1="ISPConfig hat den folgenden POP3-Server gefunden:"
 131    q_wahl_pop3="Bitte wählen Sie Ihren POP3-Server aus: "
 132    q_openssl_check="Checke, ob Paket openssl installiert ist..."
 133    q_bind_check="Checke, ob Paket bind installiert ist..."
 134    q_iptables_check="Checke, ob Programm iptables/ipchains/ipfw installiert ist..."
 135    q_httpd_check="Checke, ob Programm httpd installiert ist..."
 136    q_httpd_syntax_check="Überprüfe die Syntax der httpd.conf..."
 137    q_httpd_syntax_check_not_ok="Die Syntax der httpd.conf ist nicht ok! Bitte korrigieren Sie den Fehler. Die Installation bricht hier ab!"
 138    q_httpd_syntax_check_ok="Die Syntax ist ok!"
 139    q_check_ende="Sie muessen einige Pakete nachinstallieren!"
 140    q_mysql_running_check="MySQL laeuft nicht! Bitte starten Sie die MySQL-Datenbank und rufen Sie dann das ISPConfig-Setup erneut auf."
 141    q_mysql_sock_check="Konnte mysql.sock nicht finden! Die Installation bricht hier ab!"
 142    q_php_check="Das mitgelieferte PHP-Binary funktioniert auf Ihrem System nicht! Die Installation bricht hier ab!"
 143    q_prepare_files="Dateien werden vorbereitet. Bitte warten Sie einen Moment..."
 144    q_voraussetzungen="Alle Voraussetzungen erfuellt."
 145    q_mysql_server="Wie heisst der MySQL-Server?"
 146    q_mysql_server_check="Der angegebene MySQL-Server kann nicht erreicht werden!"
 147    q_mysql_user="Wie heisst der MySQL-User?"
 148    q_mysql_passwort="Wie heisst das MySQL-Passwort?"
 149    q_mysql_connection_check="Ihr MySQL-Passwort ist falsch!"
 150    q_mysql_database="Vergeben Sie einen Namen für die ISPConfig-Datenbank (z.B. db_ispconfig):"
 151    q_ip_address="Geben Sie die IP-Adresse des ISPConfig-Webs an (z.B. 192.168.0.1):"
 152    q_ip_check="Die IP-Adresse ist nicht erreichbar!"
 153    q_host="Geben Sie den Host-Namen an (z.B. www):"
 154    q_domain="Geben Sie die Domain an (z.B. xyz.de):"
 155    q_ispconfigprotocol="Bitte wählen Sie aus, über welches Protokoll (http oder https (SSL-Verschlüsselung)) Ihr ISPConfig-System erreichbar sein soll:"
 156    q_url_check="Die URL ist nicht erreichbar!"
 157    q_restart="Neustart einiger Dienste..."
 158    q_ende="Herzlichen Glueckwunsch! Ihr ISPConfig-System ist jetzt installiert. Falls Sie Quota nachinstalliert haben, fuehren Sie noch die in der Installationsanleitung beschriebenen Schritte durch. Ansonsten ist Ihr System jetzt ohne Reboot einsatzbereit."
 159  else
 160    if [ "$lang" == "fr" ]; then
 161      q_hinweis="Avec ce systeme d'installation, certains fichiers systeme seront modifies et quelques ajustements seront realises. Cela veut dire que vous pouvez perdre des entrees dans httpd.conf, named.conf tout comme dans la configuration de Sendmail."
 162      q_hinweis_akzeptieren="Voulez vous continuer l'installation? [Oui=y/Non=n]"
 163      q_lizenz="Merci de lire la license avec attention:"
 164      q_lizenz_akzeptieren="Acceptez vous la license ? [Oui=y/Non=n]"
 165      q_install_mode="Choississez le mode d'installation . En mode expert mode vous devez repondre a quelques questions additionnelles. En mode standard les valeurs par defaut sont appliquees."
 166      q_select="Choississez: "
 167      q_wahl="Votre choix: "
 168      q_anderer="autre"
 169      q_korrekt="Est-ce correct ? [Oui=y/Non=n]"
 170      q_mta_check="Recherche du MTA..."
 171      q_mta_pruefung1="ISPConfig a trouve le MTA suivant:"
 172      q_wahl_mta="Merci de choisir votre MTA: "
 173      q_error1="Votre configuration systeme n'est pas compatible avec ISPConfig! La routine d'installation s'arrete ici!"
 174      q_procmail_check="Recherche du paquet procmail..."
 175      q_quota_check="Recherche du paquet quota..."
 176      q_ftp_check="Recherche d'un serveur FTP installe..."
 177      q_ftp_pruefung1="ISPConfig a trouve le serveur FTP:"
 178      q_wahl_ftp="Choississez votre serveur FTP: "
 179      q_mysql_check="Recherche du paquet MySQL..."
 180      q_pop3_check="Recherche d'un serveur POP3 installe..."
 181      q_pop3_pruefung1="ISPConfig a trouve le serveur POP3:"
 182      q_wahl_pop3="Choississez votre serveur POP3: "
 183      q_openssl_check="Recherche du paquet openssl..."
 184      q_bind_check="Recherche du paquet bind..."
 185      q_iptables_check="Recherche des programmes iptables/ipchains/ipfw..."
 186      q_httpd_check="Recherche du programme httpd..."
 187      q_httpd_syntax_check="Verification de la syntaxe de httpd.conf..."
 188      q_httpd_syntax_check_not_ok="Votre syntaxe de httpd.conf est incorrecte ! Merci de corriger les erreurs. La routine d'installation s'arrete ici!"
 189      q_httpd_syntax_check_ok="La syntaxe est ok!"
 190      q_check_ende="Au moins un des paquets requis est manquant!"
 191      q_mysql_running_check="MySQL ne fonctionne pas ! Merci de demarrer MySQL et de relancer l'installation d'ISPConfig."
 192      q_mysql_sock_check="Impossible de trouver mysql.sock! La routine d'installation s'arrete ici!"
 193      q_php_check="L'executable PHP fournis avec ISPConfig ne fonctionne pas correctement avec votre systeme! La routine d'installation s'arrete ici!"
 194      q_prepare_files="Preparation des fichiers. Merci de patienter quelques instants..."
 195      q_voraussetzungen="Tous les pre-requis sont valides."
 196      q_mysql_server="Entrez le nom d'hote de votre serveur MySQL:"
 197      q_mysql_server_check="The MySQL server you specified cannot be reached!"
 198      q_mysql_user="Entrez votre nom d'utilisateur MySQL:"
 199      q_mysql_passwort="Entrez votre mot de passe MySQL:"
 200      q_mysql_connection_check="Le mot de passe MySQL fournis est faux!"
 201      q_mysql_database="Entrez le nom a donner à la base de donnees d'ISPConfig (ex: db_ispconfig):"
 202      q_ip_address="Entrez l'adresse IP ou installer le panel ISPConfig (ex: 192.168.0.1):"
 203      q_ip_check="L'adresse IP fournis est introuvable sur ce serveur!"
 204      q_host="Merci d'entrer le nom d'hote (e.g. ispconfig):"
 205      q_domain="Merci d'entrer votre domaine (e.g. xyz.fr):"
 206      q_ispconfigprotocol="Merci de selectionner un protocole (http ou https (Cryptage SSL) pour acceder au systeme ISPConfig:"
 207      q_url_check="L'URL est injoignable!"
 208      q_restart="Redemarrage des services..."
 209      q_ende="Felicitations! Votre systeme ISPConfig est maintenant installe. Si vous devez installer le paquet quota, merci de suivre les etapes inscrites dans le manuel d'installation. Sinon votre systeme est maintenant accessible sans redemarrer."
 210   else
 211      if [ "$lang" == "se" ]; then
 212        q_hinweis="I och med system installation, kommer en del system filer att bytas ut där justeringar görs. Detta kan leda till förlorade information i httpd.conf, named.conf och i Sendmail filerna."
 213        q_hinweis_akzeptieren="Vill du fortsätta med installationen? [y/n]"
 214        q_lizenz="Läs noggrant igenom licens avtalet:"
 215        q_lizenz_akzeptieren="Accepterar du licens avtalet? [y/n]"
 216        q_install_mode="Var vänlig välj installations läge. I expert läget måste du svara på ett antal frågor. I standard läget kommer förinställda värden att användas på frågorna."
 217        q_select="Vänligen välj: "
 218        q_wahl="Ditt val: "
 219        q_anderer="andra"
 220        q_korrekt="Är detta helt rätt? [y/n]"
 221        q_mta_check="Letar efter MTA..."
 222        q_mta_pruefung1="ISPConfig hittade följande MTA:"
 223        q_wahl_mta="Vänligen välj din MTA: "
 224        q_error1="Ditt system är inte kompatibelt med ISPConfig! Installationen avslutas här!"
 225        q_procmail_check="Letar efter paket procmail..."
 226        q_quota_check="Letar efter paket quota..."
 227        q_ftp_check="Kontrollerar om FTP server finns installerat..."
 228        q_ftp_pruefung1="ISPConfig hittade följande FTP server:"
 229        q_wahl_ftp="Vänligen välj din FTP server: "
 230        q_mysql_check="Letar efter paket MySQL..."
 231        q_pop3_check="Kontrollerar om POP3 server finns installerat..."
 232        q_pop3_pruefung1="ISPConfig hittade följande POP3 server:"
 233        q_wahl_pop3="Vänligen välj din POP3 server: "
 234        q_openssl_check="Letar efter paket openssl..."
 235        q_bind_check="Letar efter paket bind..."
 236        q_iptables_check="Letar efter program iptables/ipchains/ipfw..."
 237        q_httpd_check="Letar efter program httpd..."
 238        q_httpd_syntax_check="Kontrollerar syntaxen på httpd.conf..."
 239        q_httpd_syntax_check_not_ok="Syntaxen på din httpd.conf är inte ok! Vänligen korrigera dessa fel. Installationen avslutas här!"
 240        q_httpd_syntax_check_ok="Syntaxen är ok!"
 241        q_check_ende="Det saknas minst ett paket utav de som är obligatoriska!"
 242        q_mysql_running_check="MySQL är inte uppstartad! Vänligen starta din MySQL databas och kör ISPConfig installationen igen."
 243        q_mysql_sock_check="Kunde inte hitta mysql.sock! Installationen avslutas här!"
 244        q_php_check="Den binära PHP som kommer med ISPConfig fungerar inte korrekt på ditt system! Installationen avslutas här!"
 245        q_prepare_files="Förbereder filer. Vänta ett ögonblick..."
 246        q_voraussetzungen="Alla förberedelser är klara."
 247        q_mysql_server="Skriv in din MySQL server:"
 248        q_mysql_server_check="The MySQL server you specified cannot be reached!"
 249        q_mysql_user="Skriv in användare för MySQL:"
 250        q_mysql_passwort="Skriv in lösenord för MySQL:"
 251        q_mysql_connection_check="Det inskrivna lösenordet för MySQL är felaktigt!"
 252        q_mysql_database="Skriv in ett namn för ISPConfig databasen (ex. db_ispconfig):"
 253        q_ip_address="Skriv in IP adressen för din ISPConfig web (ex. 192.168.0.1):"
 254        q_ip_check="Den IP address du angav är inte åtkomstbar!"
 255        q_host="Skriv in ditt värdamn (ex. www):"
 256        q_domain="Skriv in ditt domännamn (ex. xyz.de):"
 257        q_ispconfigprotocol="Välj vilket protokoll (http eller https (SSL kryptering)) att använda för access till ISPConfig systemet:"
 258        q_url_check="Denna URL är inte åtkomstbar!"
 259        q_restart="Gör omstart på en del program..."
 260        q_ende="Gratulerar! Ditt ISPConfig system är nu installerat. Om du behöver installera quota, så följ då de steg som finns beskrivet i installations manualen. Annars är ditt system klart att användas utan omstart."
 261      else
 262        q_hinweis="With the system installation, some system files are replaced where adjustments were made. This can lead to loss of entries in httpd.conf, named.conf as well as in the Sendmail configuration."
 263        q_hinweis_akzeptieren="Do you want to continue with the installation? [y/n]"
 264        q_lizenz="Please read through the licence carefully:"
 265        q_lizenz_akzeptieren="Do you accept the licence? [y/n]"
 266        q_install_mode="Please select the installation mode. In expert mode you have to answer some additional questions. In standard mode standard values are assumed for these questions."
 267        q_select="Please select: "
 268        q_wahl="Your Choice: "
 269        q_anderer="other"
 270        q_korrekt="Is this correct? [y/n]"
 271        q_mta_check="Checking for MTA..."
 272        q_mta_pruefung1="ISPConfig found the following MTA:"
 273        q_wahl_mta="Please select your MTA: "
 274        q_error1="Your system configuration is not compatible with ISPConfig! The installation routine stops here!"
 275        q_procmail_check="Checking for package procmail..."
 276        q_quota_check="Checking for package quota..."
 277        q_ftp_check="Checking if an FTP server is installed..."
 278        q_ftp_pruefung1="ISPConfig found the following FTP server:"
 279        q_wahl_ftp="Please select your FTP server: "
 280        q_mysql_check="Checking for package MySQL..."
 281        q_pop3_check="Checking if a POP3 server is installed..."
 282        q_pop3_pruefung1="ISPConfig found the following POP3 server:"
 283        q_wahl_pop3="Please select your POP3 server: "
 284        q_openssl_check="Checking for package openssl..."
 285        q_bind_check="Checking for package bind..."
 286        q_iptables_check="Checking for program iptables/ipchains/ipfw..."
 287        q_httpd_check="Checking for program httpd..."
 288        q_httpd_syntax_check="Checking the syntax of the httpd.conf..."
 289        q_httpd_syntax_check_not_ok="The syntax of your httpd.conf is not ok! Please correct the error. The installation routine stops here!"
 290        q_httpd_syntax_check_ok="The syntax is ok!"
 291        q_check_ende="At least one of the required packages is missing!"
 292        q_mysql_running_check="MySQL is not running! Please start your MySQL database and run the ISPConfig setup again."
 293        q_mysql_sock_check="Could not find mysql.sock! The installation routine stops here!"
 294        q_php_check="The PHP binary coming with ISPConfig does not work properly on your system! The installation routine stops here!"
 295        q_prepare_files="Preparing files. Please wait a moment..."
 296        q_voraussetzungen="All prerequisites are fulfilled."
 297        q_mysql_server="Please enter your MySQL server:"
 298        q_mysql_server_check="The MySQL server you specified cannot be reached!"
 299        q_mysql_user="Please enter your MySQL user:"
 300        q_mysql_passwort="Please enter your MySQL password:"
 301        q_mysql_connection_check="The provided MySQL password is wrong!"
 302        q_mysql_database="Please enter a name for the ISPConfig database (e.g. db_ispconfig):"
 303        q_ip_address="Please enter the IP address of the ISPConfig web (e.g. 192.168.0.1):"
 304        q_ip_check="The IP address you provided is not reachable!"
 305        q_host="Please enter the host name (e.g. www):"
 306        q_domain="Please enter the domain (e.g. xyz.de):"
 307        q_ispconfigprotocol="Please select the protocol (http or https (SSL encryption)) to use to access the ISPConfig system:"
 308        q_url_check="The URL is not reachable!"
 309        q_restart="Restarting some services..."
 310        q_ende="Congratulations! Your ISPConfig system is now installed. If you had to install quota, please take the steps described in the installation manual. Otherwise your system is now available without reboot."
 311      fi
 312    fi
 313  fi
 314  
 315  waehl(){
 316    PS3=$q_wahl # Sets the prompt string.
 317    select var1
 318        do
 319          break  # if no 'break' here, keeps looping forever.
 320        done
 321    echo $var1
 322  }
 323  
 324  verify(){
 325    for home in `grep -iw $1 $2`
 326      do
 327        key=`echo $home | cut -f1 -d:`
 328        val=`echo $home | cut -f2 -d:`
 329        label=`echo $home | cut -f3 -d:`
 330        methode=`echo $home | cut -f4 -d:`
 331        optionen=(`echo $home | cut -f5 -d: | tr '|' ' '`)
 332  
 333        if [ "$3" == "standard" ]; then
 334          methode="noquestion"
 335        fi
 336  
 337        if [ "$methode" != "noquestion" ]; then
 338          echo $label: $val
 339          echo -n "$q_korrekt"
 340          read korrekt
 341          echo
 342  
 343          while [ "$korrekt" == "" ]
 344          do
 345            echo $label: $val
 346            echo -n "$q_korrekt"
 347            read korrekt
 348            echo
 349          done
 350          if [ "$korrekt" != "y" ]; then
 351            if [ "$methode" == "select" ]; then
 352              echo "$q_select"
 353              val=`waehl \`element_count=${#optionen[@]}
 354                 index=0
 355                 while [ "$index" -lt "$element_count" ]
 356                 do
 357                   echo "$optionen[$index]}"
 358                   let "index = $index + 1"
 359                 done
 360      \``
 361  
 362              while [ `element_count=${#optionen[@]}
 363                 index=0
 364                 while [ "$index" -lt "$element_count" ]
 365                 do
 366                   echo "\"$val\" != \"$optionen[$index]}\" -a"
 367                   let "index = $index + 1"
 368                 done
 369      ` "$val" != " " ]
 370              do
 371                echo "$q_select"
 372                val=`waehl \`element_count=${#optionen[@]}
 373                 index=0
 374                 while [ "$index" -lt "$element_count" ]
 375                 do
 376                   echo "$optionen[$index]}"
 377                   let "index = $index + 1"
 378                 done
 379      \``
 380              done
 381            fi
 382            if [ "$methode" == "read" ]; then
 383              echo -n "$label:"
 384              read val
 385              echo
 386            fi
 387            if [ "$methode" == "exit" ]; then
 388              error "$q_error1";
 389            fi
 390          fi
 391        fi
 392        echo "$key=$val ##" >> dist.info
 393        log "$key=$val ##"
 394     done
 395  }
 396  
 397  abfrage(){
 398    echo $3
 399    array=(`ls mod/$1/`)
 400    element_count=${#array[@]}
 401    index=0
 402    check=0
 403    while [ "$index" -lt "$element_count" ]
 404    do
 405      which $array[$index]}
 406      if [ $? == 0 ]; then
 407        server=$array[$index]}
 408        echo OK
 409        let check=1
 410        break
 411      fi
 412      let "index = $index + 1"
 413    done
 414  
 415    if [ $check == 0 ]; then
 416      error "$q_error1";
 417    else
 418      echo
 419      echo $4
 420      echo $server
 421      echo -n $q_korrekt
 422      read pruefung
 423      echo
 424  
 425      while [ "$pruefung" == "" ]
 426      do
 427        echo $4
 428        echo $server
 429        echo -n $q_korrekt
 430        read pruefung
 431        echo
 432      done
 433      if [ "$pruefung" != "y" ]; then
 434        echo $5
 435        server=`waehl \`element_count=${#array[@]}
 436                 index=0
 437                 while [ "$index" -lt "$element_count" ]
 438                 do
 439                   echo "$array[$index]}"
 440                   let "index = $index + 1"
 441                 done
 442      \` "$q_anderer"`
 443  
 444        while [ `element_count=${#array[@]}
 445                 index=0
 446                 while [ "$index" -lt "$element_count" ]
 447                 do
 448                   echo "\"$server\" != \"$array[$index]}\" -a"
 449                   let "index = $index + 1"
 450                 done
 451      ` "$server" != "$q_anderer" ]
 452        do
 453          echo $5
 454          server=`waehl \`element_count=${#array[@]}
 455                 index=0
 456                 while [ "$index" -lt "$element_count" ]
 457                 do
 458                   echo "$array[$index]}"
 459                   let "index = $index + 1"
 460                 done
 461      \` "$q_anderer"`
 462        done
 463      fi
 464  
 465      if [ "$server" == "$q_anderer" ]; then
 466        error "$q_error1";
 467      else
 468        log "$1: $server"
 469        echo "dist_$1=$server ##" >> dist.info
 470        log  "dist_$1=$server ##"
 471        verify $dist mod/$1/"$server" $2
 472      fi
 473    fi
 474  }
 475  
 476  #################### SPRACHE ENDE ################
 477  
 478    if [ "$install_art" == "install" ]; then
 479      echo $q_hinweis
 480      echo
 481      echo -n $q_hinweis_akzeptieren
 482      read hinweis
 483      echo
 484  
 485      while [ "$hinweis" == "" ]
 486      do
 487        echo -n $q_hinweis_akzeptieren
 488        read hinweis
 489        echo
 490      done
 491  
 492      if [ "$hinweis" != "y" ]; then
 493        exit 1;
 494      fi
 495      log "installation note accepted"
 496    fi
 497  
 498  ################ LIZENZ ##################
 499  echo $q_lizenz
 500  echo
 501  
 502    cat license.txt | more
 503  
 504    echo
 505    echo -n $q_lizenz_akzeptieren
 506    read lizenz
 507    echo
 508  
 509  while [ "$lizenz" == "" ]
 510  do
 511      echo -n $q_lizenz_akzeptieren
 512      read lizenz
 513      echo
 514  done
 515  
 516  if [ "$lizenz" != "y" ]; then
 517    exit 1;
 518  fi
 519  log "licence accepted"
 520  ################# LIZENZ ENDE #############
 521  
 522  if [ "$install_art" == "install" ]; then  ## install_art == install
 523  
 524    ################ INSTALLATIONSMODUS ############
 525    echo $q_install_mode
 526    install_mode=`waehl "standard" "expert"`
 527  
 528    while [ "$install_mode" != "standard" -a "$install_mode" != "expert" ]
 529    do
 530      echo $q_install_mode
 531      install_mode=`waehl "standard" "expert"`
 532    done
 533    log "installation mode: "$install_mode
 534    ############### INSTALLATIONSMODUS ENDE ###########
 535  
 536    ############ MTA #############
 537    echo
 538    echo "########## MAIL SERVER ##########"
 539    echo
 540    abfrage mail $install_mode "$q_mta_check" "$q_mta_pruefung1" "$q_wahl_mta"
 541    ############## MTA ENDE ################
 542  
 543    ############ POP3 ################
 544    #echo
 545    #echo "########## POP3 SERVER ##########"
 546    #echo
 547    #abfrage pop3 $install_mode "$q_pop3_check" "$q_pop3_pruefung1" "$q_wahl_pop3"
 548    ############### POP3 ENDE ##############
 549  
 550    ############## FTP ################
 551    echo
 552    echo "########## FTP SERVER ##########"
 553    echo
 554    abfrage ftp $install_mode "$q_ftp_check" "$q_ftp_pruefung1" "$q_wahl_ftp"
 555    ############# FTP ENDE #############
 556  
 557    echo
 558    echo "########## PROCMAIL ##########"
 559    echo
 560    echo $q_procmail_check
 561    which procmail
 562    if [ $? != 0 ]; then
 563      error "procmail not found!";
 564    else
 565      log "procmail found: `which procmail`"
 566      echo OK
 567    fi
 568  
 569    echo
 570    echo "########## QUOTA ##########"
 571    echo
 572    echo $q_quota_check
 573    which quota
 574    if [ $? != 0 ]; then
 575      error "quota not found!";
 576    else
 577      log "quota found: `which quota`"
 578      echo OK
 579    fi
 580  
 581    echo
 582    echo "########## MYSQL SERVER ##########"
 583    echo
 584    echo $q_mysql_check
 585    which mysql
 586    if [ $? != 0 ]; then
 587      error "mysql not found!";
 588    else
 589      log "mysql found: `which mysql`"
 590      echo OK
 591    fi
 592  
 593    echo
 594    echo "########## OPENSSL ##########"
 595    echo
 596    echo $q_openssl_check
 597    which openssl
 598    if [ $? != 0 ]; then
 599      error "openssl not found!";
 600    else
 601      log "openssl found: `which openssl`"
 602      echo OK
 603    fi
 604  
 605    echo
 606    echo "########## DNS SERVER ##########"
 607    echo
 608    echo $q_bind_check
 609    which named
 610    if [ $? != 0 ]; then
 611      error "named not found!";
 612    else
 613      log "named found: `which named`"
 614      echo OK
 615    fi
 616  
 617    echo
 618    echo "########## IPTABLES/IPCHAINS/IPFW ##########"
 619    echo
 620    echo $q_iptables_check
 621    which iptables
 622    if [ $? != 0 ]; then
 623      which ipchains
 624      if [ $? != 0 ]; then
 625        which ipfw
 626        if [ $? != 0 ]; then
 627          error "iptables/ipchains/ipfw not found!";
 628        else
 629          log "ipfw found: `which ipfw`"
 630          echo OK
 631        fi
 632      else
 633        log "ipchains found: `which ipchains`"
 634        echo OK
 635      fi
 636    else
 637      log "iptables found: `which iptables`"
 638      echo OK
 639    fi
 640  
 641    echo
 642    echo "########## WEB SERVER ##########"
 643    echo
 644    which httpd > /dev/null
 645    if [ $? != 0 ]; then
 646      which apache > /dev/null
 647      if [ $? == 0 ]; then
 648        ln -s `which apache` /usr/bin/httpd
 649      fi
 650      which apache2 > /dev/null
 651      if [ $? == 0 ]; then
 652        ln -s `which apache2` /usr/bin/httpd
 653      fi
 654    fi
 655  
 656    echo $q_httpd_check
 657    which httpd
 658    if [ $? != 0 ]; then
 659      which httpd2
 660      if [ $? != 0 ]; then
 661        error "httpd not found!";
 662      else
 663        ln -s `which httpd2` /usr/sbin/httpd
 664        echo OK
 665      fi
 666    else
 667      log "httpd found: `which httpd`"
 668      echo OK
 669    fi
 670  fi  ## install_art == install
 671  
 672    echo $q_httpd_syntax_check
 673    httpd -t
 674    if [ $? != 0 ]; then
 675      error "$q_httpd_syntax_check_not_ok";
 676    fi
 677    echo $q_httpd_syntax_check_ok
 678    log "httpd syntax ok!"
 679  
 680    if [ "$install_art" == "install" ]; then
 681      verify $dist mod/httpd/httpd $install_mode
 682    fi
 683  
 684    echo
 685    echo "########## INSTALLATION ##########"
 686    echo
 687    if [ -f /etc/my.cnf ]; then
 688       mv -f /etc/my.cnf /etc/my.cnf_orig
 689       grep -wv "skip-networking" /etc/my.cnf_orig > /etc/my.cnf
 690       /etc/init.d/mysql restart &> /dev/null
 691       /etc/init.d/mysqld restart &> /dev/null
 692    fi
 693    if [ -f /etc/mysql/my.cnf ]; then
 694       mv -f /etc/mysql/my.cnf /etc/mysql/my.cnf_orig
 695       grep -wv "skip-networking" /etc/mysql/my.cnf_orig > /etc/mysql/my.cnf
 696       /etc/init.d/mysql restart &> /dev/null
 697       /etc/init.d/mysqld restart &> /dev/null
 698    fi
 699    netstat -ta | grep -i mysql > /dev/null
 700    if [ $? != 0 ]; then
 701      error "$q_mysql_running_check";
 702    else
 703      if [ ! -S /var/lib/mysql/mysql.sock ] && [ ! -h  /var/lib/mysql/mysql.sock ] && [ -S  /tmp/mysql.sock ]; then
 704         if [ ! -d /var/lib/mysql ]; then
 705            mkdir -p /var/lib/mysql
 706            caselog "directory /var/lib/mysql created" "directory /var/lib/mysql  could not be created!"
 707         fi
 708         ln -s /tmp/mysql.sock /var/lib/mysql/mysql.sock
 709         caselog "symbolic link from /var/lib/mysql/mysql.sock to /tmp/mysql.sock created" "symbolic link from /var/lib/mysql/mysql.sock to /tmp/mysql.sock could not be created!"
 710      fi
 711      if [ ! -S /var/lib/mysql/mysql.sock ] && [ ! -h  /var/lib/mysql/mysql.sock ] && [ -S  /var/run/mysqld/mysqld.sock ]; then
 712         if [ ! -d /var/lib/mysql ]; then
 713            mkdir -p /var/lib/mysql
 714            caselog "directory /var/lib/mysql created" "directory /var/lib/mysql  could not be created!"
 715         fi
 716         ln -s /var/run/mysqld/mysqld.sock /var/lib/mysql/mysql.sock
 717         caselog "symbolic link from /var/lib/mysql/mysql.sock to /var/run/mysqld/mysqld.sock created" "symbolic link from /var/lib/mysql/mysql.sock to /var/run/mysqld/mysqld.sock could not be created!"
 718      fi
 719      if [ ! -S /var/lib/mysql/mysql.sock ] && [ ! -h  /var/lib/mysql/mysql.sock ] && [ -S  /var/run/mysql/mysql.sock ]; then
 720         if [ ! -d /var/lib/mysql ]; then
 721            mkdir -p /var/lib/mysql
 722            caselog "directory /var/lib/mysql created" "directory /var/lib/mysql  could not be created!"
 723         fi
 724         ln -s /var/run/mysql/mysql.sock /var/lib/mysql/mysql.sock
 725         caselog "symbolic link from /var/lib/mysql/mysql.sock to /var/run/mysql/mysql.sock created" "symbolic link from /var/lib/mysql/mysql.sock to /var/run/mysql/mysql.sock could not be created!"
 726      fi
 727      if [ ! -S /var/lib/mysql/mysql.sock ] && [ ! -h  /var/lib/mysql/mysql.sock ] && [ ! -S  /tmp/mysql.sock ] && [ ! -h  /tmp/mysql.sock ] && [ ! -S  /var/run/mysqld/mysqld.sock ] && [ ! -h  /var/run/mysqld/mysqld.sock ] && [ ! -S  /var/run/mysql/mysql.sock ] && [ ! -h  /var/run/mysql/mysql.sock ]; then
 728         error "$q_mysql_sock_check";
 729      fi
 730    fi
 731  
 732    if [ ! -S /var/www/sharedip ]; then
 733      mkdir -p /var/www/sharedip
 734          log "Directory /var/www/sharedip created."
 735          cp isp/sharedip_index.html_$lang /var/www/sharedip/index.html
 736          log "Use sharedip_index.html_$lang as SharedIP default page."
 737    fi
 738  
 739    VAR1=`cat dist.info | cut -f1 -d=`
 740    for var1 in $VAR1
 741     do
 742       echo export $var1 >> dist.info.ende
 743     done
 744    cat dist.info.ende >> dist.info
 745    rm -f dist.info.ende
 746    if [ "$install_art" == "upgrade" ] && [ -f  /root/ispconfig/dist.info ]; then
 747      cat /root/ispconfig/dist.info | grep -wv dist_httpd_conf_dir | grep -wv dist_ip > dist.info
 748    fi
 749    . dist.info
 750  
 751    echo $q_prepare_files
 752  
 753    if [ "$install_art" == "upgrade" ]; then
 754      cp -f /home/admispconfig/ispconfig/lib/config.inc.php ./
 755      caselog "saved /home/admispconfig/ispconfig/lib/config.inc.php" "could not save /home/admispconfig/ispconfig/lib/config.inc.php"
 756      cp -f /home/admispconfig/ispconfig/users ./
 757      caselog "saved /home/admispconfig/ispconfig/users" "could not save /home/admispconfig/ispconfig/users"
 758      cp -f /home/admispconfig/ispconfig/adminmail.txt ./
 759      caselog "saved /home/admispconfig/ispconfig/adminmail.txt" "could not save /home/admispconfig/ispconfig/adminmail.txt"
 760  
 761      tar -pczf root_ispconfig.tar.gz /root/ispconfig/ &> /dev/null
 762      caselog "created backup of directory /root/ispconfig/" "could not create backup of directory /root/ispconfig/"
 763      tar -pczf home_admispconfig.tar.gz /home/admispconfig/ &> /dev/null
 764      caselog "created backup of directory /home/admispconfig/" "could not create backup of directory /home/admispconfig/"
 765  
 766      rm -fr /root/ispconfig
 767      caselog "deleted directory /root/ispconfig/" "could not delete directory /root/ispconfig/"
 768    fi
 769  
 770    cd compile_aps/
 771    chmod 700 compile
 772    ./compile || (cd `pwd`/../.. && rm -fr install_ispconfig && exit 1)
 773    cd ..
 774  
 775    mv -f binaries/aps.tar.gz ./aps.tar.gz
 776    mv -f binaries/spamassassin.tar.gz ./spamassassin.tar.gz
 777    mv -f binaries/uudeview.tar.gz ./uudeview.tar.gz
 778    mv -f binaries/clamav.tar.gz ./clamav.tar.gz
 779    mv -f binaries/cronolog ./cronolog
 780    mv -f binaries/cronosplit ./cronosplit
 781    mv -f binaries/ispconfig_tcpserver ispconfig/tools/tcpserver/ispconfig_tcpserver
 782    mv -f binaries/zip ispconfig/tools/zip/zip
 783    mv -f binaries/unzip ispconfig/tools/unzip/unzip
 784    tar xfz spamassassin.tar.gz
 785    mv -f spamassassin ispconfig/tools/spamassassin
 786    tar xfz uudeview.tar.gz
 787    mv -f uudeview ispconfig/tools/uudeview
 788    tar xfz clamav.tar.gz
 789    mv -f clamav ispconfig/tools/clamav
 790    tar xfz aps.tar.gz
 791    caselog "unpacked ISPConfig system" "could not unpack ISPConfig system"
 792  
 793    ###### Prüfen, ob PHP korrekt funktioniert ######
 794    ispconfig_tmp/php/bin/php -n -q check.php
 795    if [ ! -f php_check ]; then
 796      if [ "$install_art" == "upgrade" ]; then
 797        `echo $dist_init_scripts`/ispconfig_server restart &> /dev/null
 798      fi
 799      error "$q_php_check";
 800    fi
 801    ###### Prüfen, ob PHP korrekt funktioniert ENDE ######
 802  
 803    mv -f ispconfig_tmp /root/ispconfig
 804    caselog "moved directory ispconfig_tmp to /root/ispconfig" "could not move directory ispconfig_tmp to /root/ispconfig"
 805    cp -f dist.info /root/ispconfig
 806    echo $q_voraussetzungen
 807    echo Here we go...
 808    chmod 700 ./install.php
 809  
 810    if [ "$install_art" == "install" ]; then
 811      echo -n $q_mysql_server
 812      read mysql_server
 813      while [ "$mysql_server" == "" ]
 814      do
 815        echo -n $q_mysql_server
 816        read mysql_server
 817      done
 818      ping -c3 `echo $mysql_server` &> /dev/null
 819      while [ $? != 0 ]
 820      do
 821        echo "$q_mysql_server_check"
 822        echo -n $q_mysql_server
 823        read mysql_server
 824        while [ "$mysql_server" == "" ]
 825        do
 826          echo -n $q_mysql_server
 827          read mysql_server
 828        done
 829        ping -c3 `echo $mysql_server` &> /dev/null
 830      done
 831  
 832      echo OK
 833  
 834      echo -n $q_mysql_user
 835      read mysql_user
 836      while [ "$mysql_user" == "" ]
 837      do
 838        echo -n $q_mysql_user
 839        read mysql_user
 840      done
 841      stty -echo
 842      echo -n $q_mysql_passwort
 843      read mysql_passwort
 844      stty echo
 845      echo
 846  
 847      if [ "$mysql_passwort" == "" ]; then
 848        mysql -h `echo $mysql_server` --exec=quit -u `echo $mysql_user`
 849      else
 850        mysql -h `echo $mysql_server` --exec=quit -u `echo $mysql_user` -p`echo $mysql_passwort`
 851      fi
 852  
 853      while [ $? != 0 ]
 854      do
 855        echo "$q_mysql_connection_check"
 856        echo -n $q_mysql_server
 857        read mysql_server
 858        while [ "$mysql_server" == "" ]
 859        do
 860          echo -n $q_mysql_server
 861          read mysql_server
 862        done
 863        ping -c3 `echo $mysql_server` &> /dev/null
 864        while [ $? != 0 ]
 865        do
 866          echo "$q_mysql_server_check"
 867          echo -n $q_mysql_server
 868          read mysql_server
 869          while [ "$mysql_server" == "" ]
 870          do
 871            echo -n $q_mysql_server
 872            read mysql_server
 873          done
 874          ping -c3 `echo $mysql_server` &> /dev/null
 875        done
 876  
 877        echo OK
 878  
 879        echo -n $q_mysql_user
 880        read mysql_user
 881        while [ "$mysql_user" == "" ]
 882        do
 883          echo -n $q_mysql_user
 884          read mysql_user
 885        done
 886        stty -echo
 887        echo -n $q_mysql_passwort
 888        read mysql_passwort
 889        stty echo
 890        echo
 891  
 892        if [ "$mysql_passwort" == "" ]; then
 893          mysql -h `echo $mysql_server` --exec=quit -u `echo $mysql_user`
 894        else
 895          mysql -h `echo $mysql_server` --exec=quit -u `echo $mysql_user` -p`echo $mysql_passwort`
 896        fi
 897      done
 898  
 899      echo OK
 900  
 901      echo -n $q_mysql_database
 902      read mysql_db
 903      while [ "$mysql_db" == "" ]
 904      do
 905        echo -n $q_mysql_database
 906        read mysql_db
 907      done
 908  
 909      echo -n $q_ip_address
 910      read ip
 911      while [ "$ip" == "" ]
 912      do
 913        echo -n $q_ip_address
 914        read ip
 915      done
 916  
 917      ping -c3 `echo $ip` &> /dev/null
 918      while [ $? != 0 ]
 919      do
 920        echo "$q_ip_check"
 921        echo -n $q_ip_address
 922        read ip
 923        while [ "$ip" == "" ]
 924        do
 925          echo -n $q_ip_address
 926          read ip
 927        done
 928        ping -c3 `echo $ip` &> /dev/null
 929      done
 930  
 931      echo OK
 932  
 933      echo -n $q_host
 934      read server_host
 935      echo -n $q_domain
 936      read server_domain
 937      while [ "$server_domain" == "" ]
 938      do
 939        echo -n $q_domain
 940        read server_domain
 941      done
 942  
 943      if [ "$server_host" == "" ]; then
 944        ping=`echo $server_domain`
 945      else
 946        ping=`echo $server_host`.`echo $server_domain`
 947      fi
 948      ping -c3 `echo $ping` &> /dev/null
 949  
 950      while [ $? != 0 ]
 951      do
 952        echo "$q_url_check"
 953        echo -n $q_host
 954        read server_host
 955        echo -n $q_domain
 956        read server_domain
 957        while [ "$server_domain" == "" ]
 958        do
 959          echo -n $q_domain
 960          read server_domain
 961        done
 962  
 963        if [ "$server_host" == "" ]; then
 964          ping=`echo $server_domain`
 965        else
 966          ping=`echo $server_host`.`echo $server_domain`
 967        fi
 968        ping -c3 `echo $ping` &> /dev/null
 969      done
 970  
 971      echo OK
 972  
 973      echo $q_ispconfigprotocol
 974      server_ispconfigprotocol=`waehl "HTTPS" "HTTP"`
 975  
 976      while [ "$server_ispconfigprotocol" != "HTTPS" -a "$server_ispconfigprotocol" != "HTTP" ]
 977      do
 978        echo $q_ispconfigprotocol
 979        server_ispconfigprotocol=`waehl "HTTPS" "HTTP"`
 980      done
 981    else
 982      mysql_server=
 983      mysql_user=
 984      mysql_passwort=
 985      mysql_db=
 986      ip=
 987      server_host=
 988      server_domain=
 989      server_ispconfigprotocol=
 990    fi
 991  
 992    echo
 993    {
 994    echo $mysql_server
 995    echo $mysql_user
 996    echo $mysql_passwort
 997    echo $mysql_db
 998    echo $ip
 999    echo $server_host
1000    echo $server_domain
1001    echo `which procmail`
1002    echo $lang
1003    echo $install_art
1004    echo $server_ispconfigprotocol
1005    } > mysql_config
1006    httpd -V > httpd
1007    awk -F"\"" '$1==" -D HTTPD_ROOT="{print $2}'  httpd > httpd2
1008    awk -F"\"" '$1==" -D SERVER_CONFIG_FILE="{print $2}'  httpd >> httpd2
1009    which ip &> /dev/null
1010    if [ $? != 0 ]; then
1011      OS=`uname -s`
1012      if [ "$OS" == "FreeBSD" ]; then
1013        ifconfig | grep -iw 'inet' | grep -iv 'inet6' | cut -f2 -d' ' > ip_addresses
1014      else
1015        ifconfig | grep -iw 'inet' | cut -f2 -d: | cut -f1 -d' ' > ip_addresses
1016      fi
1017    else
1018      ip addr show | grep -iw 'inet' | awk '{print $2}' | cut -f1 -d/ > ip_addresses
1019    fi
1020    /root/ispconfig/php/php -q ./install.php
1021    . /root/ispconfig/dist.info
1022    rm -f mysql_config
1023  
1024    ########## sysconfig schreiben #############
1025    uname -a > /home/admispconfig/ispconfig/sysconf.txt
1026    httpd -V >> /home/admispconfig/ispconfig/sysconf.txt
1027    ############################################
1028    echo $q_restart
1029    which apachectl > /dev/null
1030    if [ $? != 0 ]; then
1031      apache2ctl restart
1032    else
1033      apachectl restart
1034    fi
1035    caselog "httpd restart successful" "httpd did not restart!"
1036  
1037    if [ -f `echo $dist_init_scripts`/`echo $dist_mail` ] && [ -x  `echo $dist_init_scripts`/`echo $dist_mail` ]; then
1038      `echo $dist_init_scripts`/`echo $dist_mail` stop
1039      `echo $dist_init_scripts`/`echo $dist_mail` start
1040      caselog $dist_mail" restart successful" $dist_mail" did not restart!"
1041    fi
1042    if [ -f /etc/rc.d/`echo $dist_mail` ] && [ -x  /etc/rc.d/`echo $dist_mail` ]; then
1043      /etc/rc.d/`echo $dist_mail` stop
1044      /etc/rc.d/`echo $dist_mail` start
1045      caselog $dist_mail" restart successful" $dist_mail" did not restart!"
1046    fi
1047  
1048    ##############################################
1049    if [ $dist_ftp_version == "standalone" ]; then
1050      if [ -f `echo $dist_init_scripts`/`echo $dist_ftp` ] && [ -x  `echo $dist_init_scripts`/`echo $dist_ftp` ]; then
1051        `echo $dist_init_scripts`/`echo $dist_ftp` restart
1052      fi
1053      if [ -f /etc/rc.d/`echo $dist_ftp` ] && [ -x  /etc/rc.d/`echo $dist_ftp` ]; then
1054        /etc/rc.d/`echo $dist_ftp` restart
1055      fi
1056    else
1057      if [ -f `echo $dist_init_scripts`/`echo $dist_ftp_version` ] && [ -x  `echo $dist_init_scripts`/`echo $dist_ftp_version` ]; then
1058        `echo $dist_init_scripts`/`echo $dist_ftp_version` restart &> /dev/null
1059      fi
1060      if [ -f /etc/rc.d/`echo $dist_ftp_version` ] && [ -x  /etc/rc.d/`echo $dist_ftp_version` ]; then
1061        /etc/rc.d/`echo $dist_ftp_version` restart
1062      fi
1063    fi
1064    ##############################################
1065  
1066    if [ "$install_art" == "upgrade" ]; then
1067      `echo $dist_init_scripts`/ispconfig_server restart
1068    else
1069      `echo $dist_init_scripts`/ispconfig_server start
1070    fi
1071  
1072    echo $q_ende
1073    echo
1074    rm -f /root/ispconfig/dist.info
1075    caselog "file /root/ispconfig/dist.info deleted" "could not delete file /root/ispconfig/dist.info"
1076    cd `pwd`/..
1077    rm -fr install_ispconfig
1078    caselog "directory install_ispconfig deleted" "could not delete directory install_ispconfig"
1079    log "##############################"
1080  exit 0;


[ Powered by PHPXref - Served by Debian GNU/Linux ]