diff --git a/install.sh b/install.sh index 5b2d567..783c62d 100644 --- a/install.sh +++ b/install.sh @@ -165,8 +165,17 @@ on_install() { abort "Binary file for $ARCH is missing!" fi +# Backup an existing config file before proceed | quindecim + +CONFIG_FILE="/data/media/0/dnscrypt-proxy/dnscrypt-proxy.toml" + + if [ -f "$CONFIG_FILE" ]; then + ui_print "* Backing up config file" + cp -afv $CONFIG_FILE ${CONFIG_FILE}-`date +%Y%m%d%H%M`.bak + fi + if [ -d "$CONFIG_PATH" ]; then - ui_print "* Copying example and license files" + ui_print "* Copying config, example and license files" cp -af $CONFIG_PATH/* /data/media/0/dnscrypt-proxy/ else abort "Config file is missing!" @@ -192,4 +201,4 @@ set_permissions() { # set_perm $MODPATH/system/lib/libart.so 0 0 0644 } -# You can add more functions to assist your custom script code +# You can add more functions to assist your custom script code \ No newline at end of file