install_stats.sh 984 B

123456789101112131415161718192021222324252627
  1. #!/bin/bash
  2. # LinuxGSM install_stats.sh function
  3. # Author: Daniel Gibbs
  4. # Website: https://linuxgsm.com
  5. # Description: Enabled LinuxGSM Stats.
  6. functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
  7. echo -e ""
  8. echo -e "${lightyellow}LinuxGSM Stats${default}"
  9. echo -e "================================="
  10. fn_sleep_time
  11. echo -e "Assist LinuxGSM development by sending anonymous stats to developers."
  12. echo -e "More info: https://docs.linuxgsm.com/configuration/linuxgsm-stats"
  13. echo -e "The following info will be sent:"
  14. echo -e "* game server"
  15. echo -e "* distro"
  16. echo -e "* game server resource usage"
  17. echo -e "* server hardware info"
  18. if [ -z "${autoinstall}" ]; then
  19. if fn_prompt_yn "Allow anonymous usage statistics?" Y; then
  20. echo "stats=\"on\"" >> "${configdirserver}/common.cfg"
  21. fn_print_information_nl "Stats setting is now enabled in common.cfg."
  22. fi
  23. else
  24. fn_print_information_nl "auto-install leaves stats off by default. Stats can be enabled in common.cfg"
  25. fi