diff --git a/README.md b/README.md index bfd6b64b725042b409d2d37e3b6e438f70482216..d6225fb402ea5d6210cfaa8bbe896cb6c487dffd 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,9 @@ > Tested at Feb 12, 04:03, 2020 (UTC-8). -http://fkfy.hust.edu.cn/jkzksb.htm +> http://fkfy.hust.edu.cn/jkzksb.htm + +Just modify config.py and enjoy! ## requirements diff --git a/other_tools/ncov-daemon.fish b/other_tools/ncov-daemon.fish new file mode 100755 index 0000000000000000000000000000000000000000..22a2a212a6d60e9b1f5ec9670b518361bfc6a947 --- /dev/null +++ b/other_tools/ncov-daemon.fish @@ -0,0 +1,24 @@ +#!/usr/bin/fish +## This daemon will be autostart-ed on gnome startup. +## It help you submit ncov in completely automatic way. + +while true + set fname /tmp/hust-ncov-mark-(env TZ=Asia/Shanghai date +%j) + set fails 0 + if not test -f $fname + echo 'CALL HUST-NCOV' + timeout 3m /usr/mybin/hust_ncov_submit + and begin + echo 1 > $fname + echo 'SUCCESS' + set fails 0 + end; or begin + set fails (math 1+$fails) + echo "fails=$fails" + test $fails -ge 14 + and /usr/mybin/recolic_email_notify root@recolic.net "RECOLIC NCOV NOTIFY" "hust-ncov daily auto submit has been failing for $fails times. Please fix the script!" + end + end + sleep 300 +end +