oubo 3 сар өмнө
parent
commit
6b0b757710
1 өөрчлөгдсөн 5 нэмэгдсэн , 4 устгасан
  1. 5 4
      bin/utool.sh

+ 5 - 4
bin/utool.sh

@@ -142,7 +142,7 @@ function uD() {
 function eTI() {
   mkdir -p /app/sapi/web/files/tag/image/
   wget -q -O /app/sapi/web/files/tag/default.zip http://mi.lacecdn.com/tag/default.zip
-  unzip -o /app/sapi/web/files/tag/default.zip -d /app/sapi/web/files/tag/image/
+  unzip -q -o /app/sapi/web/files/tag/default.zip -d /app/sapi/web/files/tag/image/
 }
 
 #first install
@@ -158,6 +158,7 @@ function fI() {
     eTI #解压标签图片
     rS #运行安装
     rI #运行初始化
+    iC #安装crontab任务
     touch "/tmp/${DOMAIN_NAME}.lock"
 }
 #restore database
@@ -249,12 +250,12 @@ function rI() {
 }
 #install crontab
 function iC() {
-  if [ -f  /var/spool/cron/root ];then
-    sed -i "/\/app\/bin\/utool/d" /var/spool/cron/crontabs/root
+  if [ -f  /var/spool/cron/crontabs/root ];then
+    sed -i "/\/app\/bin\/utool.sh/d" /var/spool/cron/crontabs/root
   fi
   rndMinute=$(rand 1 59)
   rndHour=$(rand 1 6)
-  echo "${rndMinute} ${rndHour} * * * /app/bin/utool cT" >> /var/spool/cron/crontabs//root
+  echo "${rndMinute} ${rndHour} * * * /app/bin/utool.sh cT" >> /var/spool/cron/crontabs/root
   echo -e "Success install crontab task."
 }
 #crontab task