mirror of
https://github.com/caiwx86/small-packages.git
synced 2026-11-01 04:53:56 +08:00
update 2026-05-27 23:25:57
This commit is contained in:
1 parent
84f707b52b
commit
d0159b49a5
759 files changed
+362365
No files matched your search
@@ -0,0 +1,22 @@
|
||||
#!/bin/sh
|
||||
|
||||
[ "$ACTION" = "ifup" ] || exit 0
|
||||
[ "$INTERFACE" = "wan" ] || exit 0
|
||||
|
||||
WAN_PROTO="$(uci -q get network.wan.proto 2>/dev/null)"
|
||||
[ "$WAN_PROTO" = "pppoe" ] || exit 0
|
||||
|
||||
LOCK_FILE="/var/run/ssrplus-pppoe-hotplug.lock"
|
||||
|
||||
(
|
||||
if ! mkdir "$LOCK_FILE" 2>/dev/null; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
trap 'rmdir "$LOCK_FILE" 2>/dev/null' EXIT INT TERM
|
||||
|
||||
sleep 10
|
||||
/etc/init.d/shadowsocksr restart >/dev/null 2>&1
|
||||
) >/dev/null 2>&1 &
|
||||
|
||||
exit 0
|
||||
Reference in new issue
Block a user