install_dashy.sh 661 B

12345678910111213141516
  1. #!/bin/bash
  2. function error {
  3. echo -e "\\e[91m$1\\e[39m"
  4. exit 1
  5. }
  6. echo "Creating directory..."
  7. sudo mkdir -p /portainer/Files/AppData/Config/Dashy/ || error "Failed to create Dashy folder!"
  8. echo "Creating a blank Dashy config files"
  9. if [ -d /portainer/Files/AppData/Config/Dashy/local-conf.yml ];
  10. then
  11. sudo rm -rf /portainer/Files/AppData/Config/Dashy/local-conf.yml || error "Failed to remove the folder /portainer/Files/AppData/Config/Dashy/local-conf.yml!"
  12. fi
  13. sudo touch /portainer/Files/AppData/Config/Dashy/local-conf.yml || error "Failed to touch local-conf.yml file!"
  14. echo "Setup complete. You can now install the Dashy using the App Template."