File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed
root/usr/local/bin/wol_rffmpeg Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -86,3 +86,7 @@ WOL ENV:
8686* WOL_API = IP of docker host
8787* WOL_API_PORT= port wol_api is running on
8888* WOL_WAIT= time in seconds to wait for host to wake
89+ * WOL_NATIVE_HOST = IP of NAT gateway with forwarded port for WoL *
90+ * WOL_NATIVE_PORT = External port on gateway for forwarding. Ensure that it is mapped to your target machine IP on port 9. *
91+
92+ *Optional. Only applicable when not using the WoL docker service API and when waking from outside NAT is required. Omit, or leave blank otherwise.
Original file line number Diff line number Diff line change @@ -14,8 +14,15 @@ if [ $RFFMPEG_WOL == "native" ] && [ ! -z $RFFMPEG_HOST ] && [ ! -z $RFFMPEG_HOS
1414then
1515 echo WOL enabled
1616 echo " $RFFMPEG_HOST " is down, sending wakeup to " $mac "
17- wakeonlan $mac
18- # wakeonlan -i $RFFMPEG_HOST $mac
17+
18+ WOL_OPTIONS=" "
19+ if [ ! -z $WOL_NATIVE_HOST ]; then
20+ WOL_OPTIONS=" $WOL_OPTIONS -i $WOL_NATIVE_HOST "
21+ fi
22+ if [ ! -z $WOL_NATIVE_PORT ]; then
23+ WOL_OPTIONS=" $WOL_OPTIONS -p $WOL_NATIVE_PORT "
24+ fi
25+ wakeonlan $WOL_OPTIONS $mac
1926 echo " waiting $WOL_WAIT seconds for $RFFMPEG_HOST to wake"
2027 sleep $WOL_WAIT
2128fi
You can’t perform that action at this time.
0 commit comments