Browse Source

fix: cleardns init error

dev
dnomd343 3 years ago
parent
commit
1c9199974d
  1. 3
      Dockerfile
  2. 3
      src/cleardns.c

3
Dockerfile

@ -48,5 +48,4 @@ FROM alpine:3.15
COPY --from=asset /tmp/asset / COPY --from=asset /tmp/asset /
RUN apk add --no-cache ca-certificates glib && \ RUN apk add --no-cache ca-certificates glib && \
echo -e "0\t4\t*\t*\t*\t/etc/overture/update.sh" > /var/spool/cron/crontabs/root echo -e "0\t4\t*\t*\t*\t/etc/overture/update.sh" > /var/spool/cron/crontabs/root
ENTRYPOINT ['cleardns'] ENTRYPOINT ["cleardns"]
CMD ['--debug']

3
src/cleardns.c

@ -31,6 +31,8 @@ int main(int argc, char *argv[]) { // ClearDNS server
} }
} }
init_server(init_script, custom_script); // run init script and custom script
load_start_command(adguard_workdir, overture_config, upstream_config, debug_mode); // generate commands load_start_command(adguard_workdir, overture_config, upstream_config, debug_mode); // generate commands
if (debug_mode) { // show exec command if (debug_mode) { // show exec command
fprintf(stderr, "[ClearDNS] Debug mode.\n"); fprintf(stderr, "[ClearDNS] Debug mode.\n");
@ -40,7 +42,6 @@ int main(int argc, char *argv[]) { // ClearDNS server
show_command("[ClearDNS] dnsproxy (foreign)", foreign_dnsproxy_command); show_command("[ClearDNS] dnsproxy (foreign)", foreign_dnsproxy_command);
} }
init_server(init_script, custom_script); // run init script and custom script
server_daemon(); // run as daemon to manage process in docker server_daemon(); // run as daemon to manage process in docker
return 0; return 0;
} }

Loading…
Cancel
Save