This commit is contained in:
Affif Mukhlashin 2019-05-01 13:39:21 +07:00 committed by GitHub
parent b96a0e45f9
commit beb8c37d5c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 5 deletions

View File

@ -63,8 +63,6 @@ ui_print " Vol- = Use previous config"
ui_print " " ui_print " "
CONFIG_FILE=$MODPATH/system/etc/dnscrypt-proxy/dnscrypt-proxy.toml CONFIG_FILE=$MODPATH/system/etc/dnscrypt-proxy/dnscrypt-proxy.toml
OLD_CONFIG_FILE=$(echo $CONFIG_FILE|sed s/modules_update/modules/)
if $FUNCTION; then if $FUNCTION; then
ui_print "Replace old config" ui_print "Replace old config"
@ -73,11 +71,11 @@ if $FUNCTION; then
sed -i -e 's/127.0.0.1:53/127.0.0.1:5354/g' $CONFIG_FILE sed -i -e 's/127.0.0.1:53/127.0.0.1:5354/g' $CONFIG_FILE
sed -i -e 's/\[::1\]:53/\[::1\]:5354/g' $CONFIG_FILE sed -i -e 's/\[::1\]:53/\[::1\]:5354/g' $CONFIG_FILE
else else
if [ -f "$OLD_CONFIG_FILE" ]; then if [ -f "$CONFIG_FILE" ]; then
ui_print "* Backing up config file" ui_print "* Backing up config file"
cp $CONFIG_FILE $TMPDIR cp -af $CONFIG_FILE $TMPDIR
ui_print "* Restoring config files" ui_print "* Restoring config files"
cp -af OLD_CONFIG_FILE $CONFIG_FILE cp -af $TMPDIR/dnscrypt-proxy.toml $CONFIG_FILE
else else
abort "First install have to choose replace mode" abort "First install have to choose replace mode"
fi fi