netclient.sh 403 B

123456789101112131415161718192021
  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 -udpholepunch no
  11. if [ $? -ne 0 ]; then { echo "Failed to join, quitting." ; exit 1; } fi
  12. echo "[netclient] Starting netclient daemon"
  13. /root/netclient daemon
  14. echo "[netclient] exiting"