#!/bin/bash
if command -v openresty &> /dev/null; then echo "OpenResty is already installed." exit fi
sudo apt-get update sudo apt-get install -y curl gnupg2 ca-certificates lsb-release echo "deb http://openresty.org/package/ubuntu $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/openresty.list curl -fsSL https://openresty.org/package/pubkey.gpg | sudo apt-key add - sudo apt-get update
sudo apt-get install -y openresty
sudo apt-get install -y openresty-opm echo "OpenResty is now installed."
|