netmaker/scripts/netclient.sh

23 lines
426 B
Bash
Raw Normal View History

#!/bin/sh
echo "[netclient] joining network"
2021-11-17 11:18:24 +08:00
if [ -z "${SLEEP}" ]; then
SLEEP=10
fi
TOKEN_CMD=""
if [ "$TOKEN" != "" ]; then
TOKEN_CMD="-t $TOKEN"
fi
/root/netclient join $TOKEN_CMD -daemon off -dnson no
echo "[netclient] Starting netclient checkin"
# loop and call checkin -n all
while [ 1 ]; do
# add logs to netclient.logs
2021-11-17 11:18:24 +08:00
/root/netclient checkin -n all
sleep $SLEEP
done
echo "[netclient] exiting"