mirror of
https://github.com/juewuy/ShellCrash.git
synced 2026-03-10 23:41:22 +00:00
~增加wg和ts配置生成检测机制防止文件冲突
~bug fix
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
# Copyright (C) Juewuy
|
||||
|
||||
[ "$ts_service" = ON ] && {
|
||||
[ "$ts_service" = ON ] && grep -q '"tailscale"' "$CRASHDIR"/jsons/endpoints.json && {
|
||||
[ "$ts_subnet" = true ] && {
|
||||
. "$CRASHDIR"/starts/fw_getlanip.sh && getlanip
|
||||
advertise_routes=$(echo "$host_ipv4"|sed 's/[[:space:]]\+/", "/g; s/^/"/; s/$/"/')
|
||||
@@ -26,7 +26,7 @@
|
||||
EOF
|
||||
}
|
||||
|
||||
[ "$wg_service" = ON ] && {
|
||||
[ "$wg_service" = ON ] && grep -q '"wireguard"' "$CRASHDIR"/jsons/endpoints.json && {
|
||||
[ -n "$wg_ipv6" ] && wg_ipv6_add=", \"$wg_ipv6\""
|
||||
cat >"$TMPDIR"/jsons/wireguard.json <<EOF
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user