mirror of
https://github.com/gravitl/netmaker.git
synced 2025-10-06 01:07:41 +08:00
netclient container startup script mod
This commit is contained in:
@@ -14,14 +14,8 @@ fi
|
|||||||
/root/netclient join $TOKEN_CMD -daemon off -dnson no -udpholepunch no
|
/root/netclient join $TOKEN_CMD -daemon off -dnson no -udpholepunch no
|
||||||
if [ $? -ne 0 ]; then { echo "Failed to join, quitting." ; exit 1; } fi
|
if [ $? -ne 0 ]; then { echo "Failed to join, quitting." ; exit 1; } fi
|
||||||
|
|
||||||
echo "[netclient] Starting netclient checkin"
|
echo "[netclient] Starting netclient daemon"
|
||||||
# loop and call checkin -n all
|
|
||||||
FAILCOUNT=0
|
/root/netclient daemon
|
||||||
while [ 1 ]; do
|
|
||||||
# add logs to netclient.logs
|
|
||||||
/root/netclient checkin -n all
|
|
||||||
if [ $? -ne 0 ]; then FAILCOUNT=$((FAILCOUNT+1)) ; else FAILCOUNT=0; fi
|
|
||||||
if [ $FAILCOUNT -gt 2 ]; then { echo "Failing checkins frequently, restarting." ; exit 1; } fi
|
|
||||||
sleep $SLEEP
|
|
||||||
done
|
|
||||||
echo "[netclient] exiting"
|
echo "[netclient] exiting"
|
||||||
|
Reference in New Issue
Block a user