Sfoglia il codice sorgente

update dashy install script to remove if the config file was created as a directory.

Robert Middleswarth 2 anni fa
parent
commit
78c39e931e
1 ha cambiato i file con 5 aggiunte e 0 eliminazioni
  1. 5 0
      tools/install_dashy.sh

+ 5 - 0
tools/install_dashy.sh

@@ -7,6 +7,11 @@ function error {
 
 echo "Creating directory..."
 sudo mkdir -p /portainer/Files/AppData/Config/Dashy/ || error "Failed to create Dashy folder!"
+echo "Confirm that local-conf.yml is not a directory"
+if [ -d /portainer/Files/AppData/Config/Dashy/local-conf.yml ];
+then
+    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!"
+fi
 echo "Creating a blank Dashy config files"
 sudo touch /portainer/Files/AppData/Config/Dashy/local-conf.yml || error "Failed to touch local-conf.yml file!"
 echo "Setup complete. You can now install the Dashy using the App Template."