Uses 911K of libraries. Click here for Pure Java version (4287L/22K).
1 | !7 |
2 | |
3 | cmodule AutoRefreshCertificates > DynSingleFunction {
|
4 | transient FileWatchService watchService; |
5 | |
6 | start {
|
7 | ownResource(watchService = new FileWatchService); |
8 | File dir = javaxSecretDir(); |
9 | watchService.addRecursiveListener(dir, f -> enter {
|
10 | if (fileNameIs(f, "keystore.p12")) {
|
11 | print("Key store changed, reloading certificates: " + f);
|
12 | doIt(); |
13 | } |
14 | }); |
15 | print("Watching " + dir + " for keystore changes");
|
16 | } |
17 | |
18 | void doIt {
|
19 | call(mainMainClass(), 'serverSocketFactory_botCompanyEtc_update); |
20 | print("Done!");
|
21 | } |
22 | } |
Began life as a copy of #1028048
download show line numbers debug dex old transpilations
Travelled to 5 computer(s): bhatertpkbcr, mqqgnosmbjvj, podlckwnjdmb, pyentgdyhuwx, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1030469 |
| Snippet name: | Eleu: Auto-Refresh Certificates [only on server] |
| Eternal ID of this version: | #1030469/3 |
| Text MD5: | 7e3430e7496710c5aae00dd7cfe2f5d7 |
| Transpilation MD5: | 60ed861a76bf78a25fedfd74b03e0e81 |
| Author: | stefan |
| Category: | javax / eleu |
| Type: | JavaX source code (Dynamic Module) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2020-12-23 02:24:15 |
| Source code size: | 591 bytes / 22 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 422 / 178714 |
| Version history: | 2 change(s) |
| Referenced in: | [show references] |