#!/bin/bash

[ ! -d "/scripts" ] && mkdir /scripts 
[ ! -f "/scripts/es_index_delete.sh" ] && wget -P /scripts http://54.179.201.103:8001/es_index_delete.sh
chmod +x /scripts/es_index_delete.sh

cat >>/var/spool/cron/root<<EOF
# 每天1点执行定时任务
0 1  * * * /scripts/es_index_delete.sh
EOF

systemctl restart crond
