简化脚本和定时任务

This commit is contained in:
New Future
2018-07-29 13:46:24 +08:00
parent 650ac94291
commit 339e58b612
3 changed files with 5 additions and 5 deletions
+4 -1
View File
@@ -1,4 +1,7 @@
#!/usr/bin/env bash
RUN_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )";
echo "*/5 * * * * root ${RUN_DIR}/run.sh" > /etc/cron.d/ddns;
CMD="'$RUN_DIR/run.py' -c '$RUN_DIR/config.json' >> '$RUN_DIR/run.log'"
echo "*/5 * * * * root '$CMD'" > /etc/cron.d/ddns;
/etc/init.d/cron reload;