start.sh 549 B

123456789101112131415161718192021222324
  1. PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
  2. export PATH
  3. # fonts color
  4. Green="\033[32m"
  5. Red="\033[31m"
  6. Yellow="\033[33m"
  7. GreenBG="\033[42;37m"
  8. RedBG="\033[41;37m"
  9. Font="\033[0m"
  10. # fonts color
  11. DOMAIN=$(cat /conf/account.conf | awk -F= '{if($1~"DOMAIN")print $2}')
  12. DNSAPI=$(cat /conf/account.conf | awk -F= '{if($1~"DNSAPI")print $2}')
  13. cat >/var/spool/cron/crontabs/root<<EOF
  14. 0 0 1 * * /conf/acme.sh >/dev/null 2>&1
  15. EOF
  16. if [ ! -f "/ssl/${DOMAIN}.cer" ] && [ -n "${DOMAIN}" ]; then
  17. /conf/acme.sh
  18. fi
  19. /entry.sh daemon