• shell


    password="123456"
    fi #ifend

    # 创建Admin下的Runtime文件夹

    if [ ! -d "Admin" ];
    then
    cd ../Admin
    else
    cd Admin
    fi

    echo $password|sudo -S rm -rf Runtime
    echo $password|sudo -S mkdir Runtime
    echo $password|sudo -S chmod -R 777 Runtime

    # 创建Api下的Runtime文件夹
    cd ../Api
    echo $password|sudo -S rm -rf Runtime
    echo $password|sudo -S mkdir Runtime
    echo $password|sudo -S chmod -R 777 Runtime

    # 创建Public下的site_upload文件夹
    cd ../Public
    if [ ! -d "site_upload" ];
    then
    echo $password|sudo -S mkdir site_upload
    echo $password|sudo -S chmod -R 777 site_upload
    fi

    # 判断配置文件是否存在
    cd ../Admin/Conf
    if [ ! -f "config.php" ];then
    if [ -f "config_example.php" ];then
    echo $password|sudo -S cp config_example.php config.php
    echo $password|sudo -S chmod 777 config.php
    fi
    fi


    # 判断配置文件是否存在
    cd ../../Api/Conf
    if [ ! -f "config.php" ];then
    if [ -f "config_example.php" ];then
    echo $password|sudo -S cp config_example.php config.php
    fi
    fi

    echo "操作成功"
    exit

  • 相关阅读:
    CentOS7.4部署Python3+Django+uWSGI+Nginx
    测试:ATM
    JDBC_增删改
    HTTP请求状态码
    Servlet2
    Java日期时间3
    Servlet1
    安装Tomcat
    Java日期时间2
    广度优先遍历
  • 原文地址:https://www.cnblogs.com/pansidong/p/9520094.html
Copyright © 2020-2023  润新知