mirror of
https://github.com/itzg/docker-minecraft-server
synced 2024-11-10 06:14:14 +00:00
Apply SKIP_SUDO when starting knockd (#2795)
This commit is contained in:
parent
1d57487766
commit
94c8a86c7c
1 changed files with 6 additions and 1 deletions
|
@ -45,7 +45,12 @@ if isTrue "${DEBUG_AUTOPAUSE}"; then
|
||||||
knockdArgs+=(-D)
|
knockdArgs+=(-D)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
sudo /usr/local/sbin/knockd "${knockdArgs[@]}"
|
if isTrue "${SKIP_SUDO}"; then
|
||||||
|
/usr/local/sbin/knockd "${knockdArgs[@]}"
|
||||||
|
else
|
||||||
|
sudo /usr/local/sbin/knockd "${knockdArgs[@]}"
|
||||||
|
fi
|
||||||
|
|
||||||
if [ $? -ne 0 ] ; then
|
if [ $? -ne 0 ] ; then
|
||||||
logAutopause "Failed to start knockd daemon."
|
logAutopause "Failed to start knockd daemon."
|
||||||
logAutopause "Probable cause: Unable to attach to interface \"$AUTOPAUSE_KNOCK_INTERFACE\"."
|
logAutopause "Probable cause: Unable to attach to interface \"$AUTOPAUSE_KNOCK_INTERFACE\"."
|
||||||
|
|
Loading…
Reference in a new issue