Merge pull request #728 from a-priestley/jellyfin-rffmpeg

Jellyfin rffmpeg NAT WoL
This commit is contained in:
aptalca
2023-08-10 17:39:16 -04:00
committed by GitHub
2 changed files with 13 additions and 2 deletions
+4
View File
@@ -86,3 +86,7 @@ WOL ENV:
* WOL_API = IP of docker host
* WOL_API_PORT= port wol_api is running on
* WOL_WAIT= time in seconds to wait for host to wake
* WOL_NATIVE_HOST = IP of NAT gateway with forwarded port for WoL *
* WOL_NATIVE_PORT = External port on gateway for forwarding. Ensure that it is mapped to your target machine IP on port 9. *
*Optional. Only applicable when not using the WoL docker service API and when waking from outside NAT is required. Omit, or leave blank otherwise.
+9 -2
View File
@@ -14,8 +14,15 @@ if [ $RFFMPEG_WOL == "native" ] && [ ! -z $RFFMPEG_HOST ] && [ ! -z $RFFMPEG_HOS
then
echo WOL enabled
echo "$RFFMPEG_HOST" is down, sending wakeup to "$mac"
wakeonlan $mac
#wakeonlan -i $RFFMPEG_HOST $mac
WOL_OPTIONS=""
if [ ! -z $WOL_NATIVE_HOST ]; then
WOL_OPTIONS="$WOL_OPTIONS -i $WOL_NATIVE_HOST"
fi
if [ ! -z $WOL_NATIVE_PORT ]; then
WOL_OPTIONS="$WOL_OPTIONS -p $WOL_NATIVE_PORT"
fi
wakeonlan $WOL_OPTIONS $mac
echo "waiting $WOL_WAIT seconds for $RFFMPEG_HOST to wake"
sleep $WOL_WAIT
fi