From 6f41757ddcfce02b5abba47bd4eae94f40362257 Mon Sep 17 00:00:00 2001 From: bluemeda Date: Wed, 7 Mar 2018 01:33:50 +0700 Subject: [PATCH] bug fix --- config.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/config.sh b/config.sh index 36431fb..184552f 100755 --- a/config.sh +++ b/config.sh @@ -105,7 +105,13 @@ install_dnscrypt_proxy(){ BINARY_PATH=$INSTALLER/binary/dnscrypt-proxy-arm64 fi + CONFIG_FILE=$MODPATH/system/etc/dnscrypt-proxy/dnscrypt-proxy.toml CONFIG_PATH=$INSTALLER/config + + if [ ! -f "$CONFIG_FILE"]; then + cp $CONFIG_FILE $TMPDIR + fi + unzip -o "$ZIP" 'config/*' 'binary/*' -d $INSTALLER 2>/dev/null ui_print "* Creating binary path" @@ -128,8 +134,11 @@ install_dnscrypt_proxy(){ abort "Config file is missing!" fi - if [ ! -f "$MODPATH/system/etc/dnscrypt-proxy/dnscrypt-proxy.toml"]; then + if [ ! -f $CONFIG_FILE]; then ui_print "copying config files" - cp -af $CONFIG_PATH/example-dnscrypt-proxy.toml $MODPATH/system/etc/dnscrypt-proxy + cp -af $CONFIG_PATH/example-dnscrypt-proxy.toml $MODPATH/system/etc/dnscrypt-proxy/dnscrypt-proxy.toml + else + cp -af $TMPDIR/dnscrypt-proxy.toml $MODPATH/system/etc/dnscrypt-proxy.toml fi + }