install_stats.sh 1.0 KB

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