mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-11-02 19:03:56 +08:00
✨ Sync 2026-08-13 22:19:05
This commit is contained in:
1 parent
b3d043e5e5
commit
839d09ae31
110 files changed
+87700
-7
No files matched your search
Executable
+21
@@ -0,0 +1,21 @@
|
||||
#!/bin/sh
|
||||
|
||||
# frpc/frps both accept "verify -c <file>" to validate a config without
|
||||
# connecting, which exercises the TOML config loader end-to-end.
|
||||
case "$1" in
|
||||
frpc)
|
||||
conf="/tmp/frpc.$$.toml"
|
||||
printf 'serverAddr = "127.0.0.1"\nserverPort = 7000\n' > "$conf"
|
||||
frpc verify -c "$conf" || { echo "FAIL: frpc rejected a valid config"; rm -f "$conf"; exit 1; }
|
||||
rm -f "$conf"
|
||||
;;
|
||||
frps)
|
||||
conf="/tmp/frps.$$.toml"
|
||||
printf 'bindPort = 7000\n' > "$conf"
|
||||
frps verify -c "$conf" || { echo "FAIL: frps rejected a valid config"; rm -f "$conf"; exit 1; }
|
||||
rm -f "$conf"
|
||||
;;
|
||||
*)
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
Reference in new issue
Block a user