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