Copy code #!/bin/bash # Check if the script is run as a sudoer (root user) if [ "$(id -u)" -eq 0 ]; then echo "Please don't run this script as a root user or with sudo." exit 1 fi # Update and upgrade the system packages sudo apt update sudo apt upgrade -y # Install dependencies sudo apt install -y curl # Install faasd curl -sSL https://cli.openfaas.com | sudo sh sudo faasd install # Print the OpenFaaS gateway URL and login credentials echo "OpenFaaS is now installed." echo "Gateway URL: http://127.0.0.1:8080" echo "Username: admin" PASSWORD=$(sudo cat /var/lib/faasd/secrets/basic-auth-password | base64 --decode) echo "Password: $PASSWORD"