tasmoadmin-install.sh 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. #!/usr/bin/env bash
  2. # Copyright (c) 2021-2023 tteck
  3. # Author: tteck (tteckster)
  4. # License: MIT
  5. # https://github.com/tteck/Proxmox/raw/main/LICENSE
  6. source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
  7. color
  8. verb_ip6
  9. catch_errors
  10. setting_up_container
  11. network_check
  12. update_os
  13. msg_info "Installing Dependencies"
  14. $STD apt-get install -y curl
  15. $STD apt-get install -y sudo
  16. $STD apt-get install -y mc
  17. $STD apt-get install -y apache2
  18. $STD apt-get install -y php8.2
  19. $STD apt-get install -y libapache2-mod-php
  20. $STD apt-get install -y php8.2-curl
  21. $STD apt-get install -y php8.2-zip
  22. $STD apt-get install -y php8.2-mbstring
  23. $STD apt-get install -y php8.2-xml
  24. $STD apt-get install -y git
  25. msg_ok "Installed Dependencies"
  26. msg_info "Installing TasmoAdmin"
  27. wget -q https://github.com/TasmoAdmin/TasmoAdmin/releases/download/v3.1.1/tasmoadmin_v3.1.1.tar.gz
  28. tar -xzf tasmoadmin_v3.1.1.tar.gz -C /var/www/
  29. rm -rf tasmoadmin_v3.1.1.tar.gz /etc/php/8.2/apache2/conf.d/10-opcache.ini
  30. chown -R www-data:www-data /var/www/tasmoadmin
  31. chmod 777 /var/www/tasmoadmin/tmp /var/www/tasmoadmin/data
  32. cat <<EOF >/etc/apache2/sites-available/tasmoadmin.conf
  33. <VirtualHost *:9999>
  34. ServerName tasmoadmin
  35. ServerAdmin webmaster@localhost
  36. DocumentRoot /var/www/tasmoadmin
  37. <Directory /var/www/tasmoadmin>
  38. AllowOverride All
  39. Order allow,deny
  40. allow from all
  41. </Directory>
  42. ErrorLog /var/log/apache2/error.log
  43. LogLevel warn
  44. CustomLog /var/log/apache2/access.log combined
  45. ServerSignature On
  46. </VirtualHost>
  47. EOF
  48. sed -i '6iListen 9999' /etc/apache2/ports.conf
  49. $STD a2ensite tasmoadmin
  50. $STD a2enmod rewrite
  51. systemctl reload apache2
  52. systemctl restart apache2
  53. msg_ok "Installed TasmoAdmin"
  54. motd_ssh
  55. customize
  56. msg_info "Cleaning up"
  57. $STD apt-get autoremove
  58. $STD apt-get autoclean
  59. msg_ok "Cleaned"