check_env function parsing

Source: Internet
Author: User

is also a longer function, is used to check file permissions, directory conditions. The specific code is as follows:

Check_env () {    # Check user privilege.    #检查用户权限
    check_user root    hostname.
    #检查主机名是否符合规则    check_hostname    Dialog.
    #检查配置工具dialog是否存在    check_pkg ${bin_dialog} ${pkg_dialog}    "Checking Configuration file: ${iredmail_config_file} ... "    #判断配置文件是否存在, the default installation package is not available and should be used for installation after the outage is resumed.
    if  then        if grep ' ^ #EOF $ ' ${iredmail_config_file} >/dev/nullthen            echo'  [ FOUND]"            "useit for mail server setting? [y| N]"
            Read_setting ${auto_use_existing_config_file}
            #给用户一个选择, whether to use an existing configuration file or reinstall
             Case$ANSWERinchY|y) Echo_info"Use config file: ${iredmail_config_file} for mail server setting.". ${iredmail_config_file} # Check installation status. # After each component installation is completed, there # should be a variableinch${status_file}, e.g. # # Export Status_php_installation=' Done'# Export Status_php_configuration=' Done'                    #
                    #判断状态文件是否存在, read the state file if it exists
                                    if[-F ${status_file}]; ThenEcho_info"Import installation process status from file: ${status_file}.". ${status_file}Else                        Echo "'>${status_file}fi# Initialize Tipfile. if[!-f ${tip_file}]; Then                        Cat> ${tip_file} <<eof${conf_msg}eoffi                    ;; N|n|*) Echo_info"Skip configuration file: ${iredmail_config_file}.". ${config_via_dialog};; Esac        ElseEcho_info"Found, but not finished.". ${config_via_dialog}fi    ElseEcho_info"[not FOUND]". ${config_via_dialog}fiCheck_runtime_dir}

check_env function parsing

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.