diff --git a/Tools/install_flatnotes.sh b/Tools/install_flatnotes.sh new file mode 100644 index 0000000..34deba3 --- /dev/null +++ b/Tools/install_flatnotes.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +function error { + echo -e "\\e[91m$1\\e[39m" + exit 1 +} + +echo "Creating directory..." +sudo mkdir -p /portainer/Files/AppData/Config/flatnotes || error "Failed to create folder!" +sudo mkdir -p /portainer/Files/AppData/Config/flatnotes/data || error "Failed to create folder!" +sudo chown -R 1000.1000 /portainer/Files/AppData/Config/flatnotes || error "Failed to create folder!" +echo "Setup complete. You can now install Flatnotes using the App Template." \ No newline at end of file diff --git a/Tools/install_grafana.sh b/Tools/install_grafana.sh new file mode 100644 index 0000000..19256cd --- /dev/null +++ b/Tools/install_grafana.sh @@ -0,0 +1,32 @@ +#!/bin/bash + +function error { + echo -e "\\e[91m$1\\e[39m" + exit 1 +} + +function check_internet() { + printf "Checking if you are online..." + wget -q --spider http://github.com + if [ $? -eq 0 ]; then + echo "Online. Continuing." + else + error "Offline. Go connect to the internet then run the script again." + fi +} + +check_internet + +echo "Creating directories..." +sudo mkdir -p /portainer/Files/AppData/Config/grafana/data || error "Failed to create data directory for Grafana!" + +echo "Download grafana.ini ..." +if [ -d /portainer/Files/AppData/Config/grafana/grafana.ini ]; +then + echo "/portainer/Files/AppData/Config/grafana/grafana.ini is a directory removing" + rm -rf '/portainer/Files/AppData/Config/grafana/grafana.ini' +fi +sudo touch /portainer/Files/AppData/Config/grafana/grafana.ini || error "Failed to touch grafana.ini file!" +echo "Setting permissions..." +sudo chown -R 472:472 /portainer/Files/AppData/Config/grafana/data || error "Failed to set permissions for Grafana data!" +echo "Done You are ready to goto next step in the install document" \ No newline at end of file diff --git a/Tools/install_homer.sh b/Tools/install_homer.sh new file mode 100644 index 0000000..58370fc --- /dev/null +++ b/Tools/install_homer.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +function error { + echo -e "\\e[91m$1\\e[39m" + exit 1 +} + +echo "Creating directory..." +sudo mkdir -p /portainer/Files/AppData/Config/Homer || error "Failed to create Homer folder!" +sudo mkdir -p /portainer/Files/AppData/Config/Homer/assets || error "Failed to create Homer folder!" +sudo chown -R 1000.1000 /portainer/Files/AppData/Config/Homer || error "Failed to create Homer folder!" +echo "Setup complete. You can now install the Homer using the App Template." \ No newline at end of file diff --git a/Tools/install_nextcloud.sh b/Tools/install_nextcloud.sh new file mode 100644 index 0000000..2614262 --- /dev/null +++ b/Tools/install_nextcloud.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +function error { + echo -e "\\e[91m$1\\e[39m" + exit 1 +} + +echo "Creating directory..." +sudo mkdir -p /portainer/Files/AppData/Config/Nextcloud/Config || error "Failed to create Config folder!" +sudo mkdir -p /portainer/Files/AppData/Config/Nextcloud/Data || error "Failed to Data folder!" +sudo chown -R 1000.1000 /portainer/Files/AppData/Config/Nextcloud || error "Failed set permission Nextloud folder!" +echo "Setup complete. You can now install Nextcloud using the App Template. This script specified for Nextcloud stack" \ No newline at end of file diff --git a/Tools/install_portainer_agent.sh b/Tools/install_portainer_agent.sh new file mode 100644 index 0000000..19c9191 --- /dev/null +++ b/Tools/install_portainer_agent.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +function error { + echo -e "\\e[91m$1\\e[39m" + exit 1 +} + +function check_internet() { + printf "Checking if you are online..." + wget -q --spider http://github.com + if [ $? -eq 0 ]; then + echo "Online. Continuing." + else + error "Offline. Go connect to the internet then run the script again." + fi +} + +check_internet + +sudo docker run -d -p 9001:9001 --name portainer_agent --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/docker/volumes:/var/lib/docker/volumes portainer/agent:latest || error "Failed to execute newer version of Portainer Agent!" \ No newline at end of file