代码拉取完成,页面将自动刷新
#!/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
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。