2018-04-17 09:11:52 +00:00
|
|
|
|
2019-10-29 17:59:07 +00:00
|
|
|
CONFIG_FILE="/data/media/0/dnscrypt-proxy/dnscrypt-proxy.toml"
|
2018-04-17 09:11:52 +00:00
|
|
|
|
2019-10-29 17:59:07 +00:00
|
|
|
if [ -f "$CONFIG_FILE" ]; then
|
|
|
|
|
|
|
|
## bluemeda
|
|
|
|
ui_print "* Backing up config file"
|
2019-06-13 08:43:35 +00:00
|
|
|
# cp -afv $CONFIG_FILE $TMPDIR
|
|
|
|
# ui_print "* Restoring config files"
|
2019-10-29 17:59:07 +00:00
|
|
|
# cp -af $TMPDIR/dnscrypt-proxy.toml $CONFIG_FILE
|
|
|
|
# cp -afv /data/media/0/dnscrypt-proxy/example-dnscrypt-proxy.toml $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
|
|
|
|
|
|
|
|
## quindecim
|
|
|
|
cp -afv $CONFIG_FILE ${CONFIG_FILE}-backup-`date +%Y%m%d%H%M`
|
2019-04-30 06:33:52 +00:00
|
|
|
fi
|
2019-10-29 17:59:07 +00:00
|
|
|
|
|
|
|
cp -afv /data/media/0/dnscrypt-proxy/my-dnscrypt-proxy.toml $CONFIG_FILE
|