install_stats.sh 1.0 KB

1234567891011121314151617181920212223242526272829
  1. #!/bin/bash
  2. # LinuxGSM install_stats.sh function
  3. # Author: Daniel Gibbs
  4. # Website: https://linuxgsm.com
  5. # Description: Enabled LinuxGSM Stats.
  6. local modulename="INSTALL"
  7. local commandaction="Install"
  8. local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
  9. echo -e ""
  10. echo -e "${lightyellow}LinuxGSM Stats${default}"
  11. echo -e "================================="
  12. fn_sleep_time
  13. echo -e "Assist LinuxGSM development by sending anonymous stats to developers."
  14. echo -e "More info: https://docs.linuxgsm.com/configuration/linuxgsm-stats"
  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. fn_print_information_nl "auto-install leaves stats off by default. Stats can be enabled in common.cfg"
  27. fi