From d90a7d8ed54c47a853b1c7d58ac8bf3c5edce0f7 Mon Sep 17 00:00:00 2001 From: wulabing Date: Sat, 27 Jan 2018 11:12:06 +0800 Subject: [PATCH] Update install.sh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 完善: 添加 cron 依赖安装 --- install.sh | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 4ec2cb7..9a66d2b 100644 --- a/install.sh +++ b/install.sh @@ -96,6 +96,21 @@ time_modify(){ } dependency_install(){ ${INS} install wget curl -y + + if [[ "${ID}" == "centos" ]];then + yum -y install crontabs + else + apt-get install cron + fi + + if [[ $? -eq 0 ]];then + echo -e "${OK} ${GreenBG} crontab 安装完成 ${Font}" + sleep 1 + else + echo -e "${Error} ${RedBG} crontab 安装失败 ${Font}" + exit 1 + fi + ${INS} install net-tools -y if [[ $? -eq 0 ]];then echo -e "${OK} ${GreenBG} net-tools 安装完成 ${Font}" @@ -382,4 +397,4 @@ main(){ start_process_systemd } -main \ No newline at end of file +main