Last active
June 25, 2024 11:43
-
-
Save frogkind/8ec0d09caaa26bbf606c8c6b6b2b3fea to your computer and use it in GitHub Desktop.
Revisions
-
frogkind revised this gist
Jun 25, 2024 . No changes.There are no files selected for viewing
-
frogkind revised this gist
Jun 25, 2024 . No changes.There are no files selected for viewing
-
frogkind created this gist
Jun 25, 2024 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,17 @@ #!/bin/sh # # This file is interpreted as shell script. # Put your custom openvpn action here, they will # be executed with each opevnp event. # # $ACTION # <down> down action is generated after the TUN/TAP device is closed # <up> up action is generated after the TUN/TAP device is opened # $INSTANCE Name of the openvpn instance which went up or down if [[ "$ACTION" == "up" && "$2" == "tun0" ]] ; then uci set tinyproxy.@tinyproxy[0].Bind=$5 uci commit tinyproxy service tinyproxy restart logger -t "openvpn($INSTANCE)" -p daemon.notice "set tinyproxy bind ip $5" fi