当前仓库属于暂停状态,部分功能使用受限,详情请查阅 仓库状态说明
3 Star 23 Fork 6

Arjun/ollnmp
暂停

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
app.sh 1.24 KB
一键复制 编辑 原始数据 按行查看 历史
18818701315@163.COM 提交于 2019-04-13 01:41 . 提交初始化代码
#!/bin/bash
if [ -z ${webroot} ]; then
Echo_Red 'webroot path is empty!'
exit 0
fi
if [ -z ${redisPort} ]; then
Echo_Red 'redis Port path is empty!'
exit 0
fi
if [ -z ${mysqlPassword} ]; then
Echo_Red 'mysql Password path is empty!'
exit 0
fi
if [ -z ${source_dir} ]; then
Echo_Red 'source_dir is empty!'
exit 0
fi
if [ -z ${ntopngUrl} ]; then
Echo_Red 'ntopng url is empty!'
exit 0
fi
# tar -zcvf ${appName}.tar.gz ${appName}/* 将${appName}文件夹压缩打包
tar_code(){
cd ${source_dir}/code
tar -zxvf ${appName}.tar.gz
if [ ! -d ${webroot} ]; then
mkdir ${webroot}
fi
\cp ${source_dir}/code/${appName}/* ${webroot} -rf
}
update_config(){
sed -i "s/'app_debug' => true/'app_debug' => false/g" ${webroot}config/config.php
sed -i "s/'port' => 6380/'port' => ${redisPort}/g" ${webroot}config/config.php
sed -i "s/'debug' => true/'debug' => false/g" ${webroot}config/database.php
sed -i "s/'password' => '123456'/'password' => ${mysqlPassword}/g" ${webroot}config/database.php
cd ${webroot}shell
chmod -R 555 *
chmod -R 555 */*
chown -R www:www ${webroot}
chown -R www:www ${webroot}*
}
tar_code
update_config
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Shell
1
https://gitee.com/SimplerWorker/ollnmp.git
git@gitee.com:SimplerWorker/ollnmp.git
SimplerWorker
ollnmp
ollnmp
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385