install_stats.sh 1.1 KB

123456789101112131415161718192021222324252627282930
  1. #!/bin/bash
  2. # LinuxGSM install_stats.sh module
  3. # Author: Daniel Gibbs
  4. # Contributors: https://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 "${bold}${lightyellow}LinuxGSM Stats${default}"
  10. fn_messages_separator
  11. echo -e "Assist LinuxGSM development by sending anonymous stats to developers."
  12. echo -e "Collected data is publicly available: ${italic}https://linuxgsm.com/data/usage${default}"
  13. echo -e "More info: ${italic}https://docs.linuxgsm.com/configuration/linuxgsm-stats${default}"
  14. echo -e ""
  15. echo -e "The following info will be sent: "
  16. echo -e "* game server"
  17. echo -e "* distro"
  18. echo -e "* game server resource usage"
  19. echo -e "* server hardware info"
  20. if [ -z "${autoinstall}" ]; then
  21. if fn_prompt_yn "Allow anonymous usage statistics?" Y; then
  22. echo "stats=\"on\"" >> "${configdirserver}/common.cfg"
  23. fn_print_information_nl "Stats setting is now enabled in common.cfg."
  24. fi
  25. else
  26. echo -e ""
  27. echo -e "auto-install leaves stats off by default. Stats can be enabled in ${italic}common.cfg${default}"
  28. fi