1
0

check_dir.sh 928 B

12345678910111213141516171819
  1. #!/bin/bash
  2. # Author: yeho <lj2007331 AT gmail.com>
  3. # BLOG: https://linuxeye.com
  4. #
  5. # Notes: OneinStack for CentOS/RedHat 7+ Debian 9+ and Ubuntu 16+
  6. #
  7. # Project home page:
  8. # https://oneinstack.com
  9. # https://github.com/oneinstack/oneinstack
  10. # check MySQL dir
  11. [ -d "${mysql_install_dir}/support-files" ] && { db_install_dir=${mysql_install_dir}; db_data_dir=${mysql_data_dir}; }
  12. [ -d "${mariadb_install_dir}/support-files" ] && { db_install_dir=${mariadb_install_dir}; db_data_dir=${mariadb_data_dir}; }
  13. [ -d "${percona_install_dir}/support-files" ] && { db_install_dir=${percona_install_dir}; db_data_dir=${percona_data_dir}; }
  14. # check Nginx dir
  15. [ -e "${nginx_install_dir}/sbin/nginx" ] && web_install_dir=${nginx_install_dir}
  16. [ -e "${tengine_install_dir}/sbin/nginx" ] && web_install_dir=${tengine_install_dir}
  17. [ -e "${openresty_install_dir}/nginx/sbin/nginx" ] && web_install_dir=${openresty_install_dir}/nginx