Skip to content

Commit

Permalink
Update simplednscrypt.json
Browse files Browse the repository at this point in the history
  • Loading branch information
markpash authored Feb 5, 2024
1 parent 8d317d8 commit 2b328b8
Showing 1 changed file with 37 additions and 3 deletions.
40 changes: 37 additions & 3 deletions bucket/simplednscrypt.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,41 @@
}
}
},
"installer": {
"file": "SimpleDnsCrypt.msi"
}
"pre_install": [
"'blacklist.txt', 'blocked.log', 'query.log', 'domain-blacklist.txt', 'domain-whitelist.txt' | ForEach-Object {",
" if (!(Test-Path \"$persist_dir\\dnscrypt-proxy\\$_\")) { New-Item \"$dir\\dnscrypt-proxy\\$_\" -ItemType File | Out-Null }",
"};",
"if (!(Test-Path \"$persist_dir\\dnscrypt-proxy\\$dnscrypt-proxy.toml\")) { Copy-Item \"$dir\\dnscrypt-proxy\\dnscrypt-proxy.toml.example\" \"$dir\\dnscrypt-proxy\\dnscrypt-proxy.toml\" }"
],
"persist": [
"dnscrypt-proxy\\dnscrypt-proxy.toml",
"dnscrypt-proxy\\blacklist.txt",
"dnscrypt-proxy\\blocked.log",
"dnscrypt-proxy\\query.log",
"dnscrypt-proxy\\domain-blacklist.txt",
"dnscrypt-proxy\\domain-whitelist.txt"
],
"extract_dir": "SimpleDNSCrypt",
"shortcuts": [
[
"SimpleDnsCrypt.exe",
"SimpleDnsCrypt"
]
],
"bin": "SimpleDnsCrypt.exe",
"pre_uninstall": [
"if (!(is_admin)) { error \"$app requires admin rights to $cmd\"; break }",
"",
"Start-Process -Wait \"$dir\\Uninstall.exe\" | Out-Null",
"if (Get-Process -Name 'SimpleDnsCrypt' -ErrorAction SilentlyContinue) { Stop-Process -Name 'SimpleDnsCrypt' | Out-Null }",
"$service = Get-Service -Name 'dnscrypt-proxy' -ErrorAction SilentlyContinue",
"if (($service) -and ($service.Status -ne 'Stopped')) {",
" if (!(is_admin)) { error 'Admin rights are required to stop dnscrypt-proxy service'; break }",
" Stop-Service -Name 'dnscrypt-proxy' | Out-Null",
"}",
"if (($service) -and ($cmd -eq 'uninstall')) {",
" if (!(is_admin)) { error 'Admin rights are required to remove dnscrypt-proxy service'; break }",
" Remove-Service -Name 'dnscrypt-proxy' | Out-Null",
"}"
]
}

0 comments on commit 2b328b8

Please sign in to comment.