/ hooks / pre_start.sh
pre_start.sh
 1  #!/bin/bash
 2  
 3  OPEN_FILES_RECOMMENDED=1024
 4  ULIMIT=$(ulimit -n)
 5  AE_OPEN_FILES_LIMIT=${AE_OPEN_FILES_LIMIT:-$ULIMIT}
 6  export AE_OPEN_FILES_LIMIT
 7  
 8  if [ "$OPEN_FILES_RECOMMENDED" -gt "$AE_OPEN_FILES_LIMIT" ]; then
 9      echo "WARNING: ulimit -n is $ULIMIT; $OPEN_FILES_RECOMMENDED is the recommended minimum."
10      echo "You are recommended to ensure the node is stopped and raise the maximum number of open files before starting the node."
11      echo "Visit https://github.com/aeternity/aeternity/wiki/Setting-Number-of-Max-Open-Files for additional pointers."
12  fi