From c369e7833f7c1dcd9923a135e36398fd15c6b516 Mon Sep 17 00:00:00 2001 From: Dnomd343 Date: Wed, 28 Apr 2021 00:17:55 +0800 Subject: [PATCH] update: auto renew the database of qqwry.dat --- Dockerfile | 3 ++- conf/docker/init.sh | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index bbfc55e..18bb9eb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,5 +4,6 @@ ADD ./conf/docker/init.sh / RUN apk --update add --no-cache nginx curl nodejs php7 php7-fpm php7-json php7-iconv php7-sqlite3 php7-openssl && \ mkdir /run/nginx && touch /run/nginx/nginx.pid && \ cp /var/www/echoIP/conf/nginx/docker.conf /etc/nginx/conf.d && \ - cp /var/www/echoIP/conf/docker/init.sh / + cp /var/www/echoIP/conf/docker/init.sh / && \ + sed -i '$i\0\t0\t*\t*\t*\t/var/www/echoIP/backend/qqwryUpdate.sh' /var/spool/cron/crontabs/root CMD ["sh","init.sh"] diff --git a/conf/docker/init.sh b/conf/docker/init.sh index be68f3c..8a25ef2 100644 --- a/conf/docker/init.sh +++ b/conf/docker/init.sh @@ -1,4 +1,5 @@ /usr/sbin/php-fpm7 /usr/sbin/nginx +/usr/sbin/crond node /var/www/echoIP/backend/qqwryFormat/server.js /bin/sh