netclient.sh 426 B

12345678910111213141516171819202122
  1. #!/bin/sh
  2. echo "[netclient] joining network"
  3. if [ -z "${SLEEP}" ]; then
  4. SLEEP=10
  5. fi
  6. TOKEN_CMD=""
  7. if [ "$TOKEN" != "" ]; then
  8. TOKEN_CMD="-t $TOKEN"
  9. fi
  10. /root/netclient join $TOKEN_CMD -daemon off -dnson no
  11. echo "[netclient] Starting netclient checkin"
  12. # loop and call checkin -n all
  13. while [ 1 ]; do
  14. # add logs to netclient.logs
  15. /root/netclient checkin -n all
  16. sleep $SLEEP
  17. done
  18. echo "[netclient] exiting"