File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55# Exit codes: 0 = working, 1 = not working or error
66
77DNSCRYPT_PROXY=~ /src/dnscrypt-proxy/dnscrypt-proxy/dnscrypt-proxy
8- CONFIG=" /tmp/dnscrypt-proxy-check.toml"
9- PIDFILE=" /tmp/dnscrypt-proxy-check.pid"
10- LOGFILE=" /tmp/dnscrypt-proxy-check.log"
8+ WORKDIR=$( mktemp -d /tmp/dnscrypt-proxy-check-XXXXXX)
9+ CONFIG=" $WORKDIR /config.toml"
10+ PIDFILE=" $WORKDIR /pid"
11+ LOGFILE=" $WORKDIR /log"
12+ PORT=" ${CHECK_PORT:- 5300} "
1113
1214# Check arguments
1315if [ $# -ne 1 ]; then
@@ -34,13 +36,13 @@ cleanup() {
3436 if [ -f " $PIDFILE " ]; then
3537 kill $( cat " $PIDFILE " ) 2> /dev/null
3638 fi
37- rm -f " $CONFIG " " $PIDFILE " " $LOGFILE "
39+ rm -rf " $WORKDIR "
3840}
3941trap cleanup EXIT
4042
4143# Create config file
4244{
43- echo ' listen_addresses = ["127.0.0.1:5300"] '
45+ echo " listen_addresses = [\ " 127.0.0.1:${PORT} \" ] "
4446 echo ' server_names = ["test-server"]'
4547 echo ' odoh_servers = true'
4648 echo ' timeout = 5000'
You can’t perform that action at this time.
0 commit comments