#!/bin/bash set -e if [ "$#" -ne 1 ] then echo "USAGE: $0 DOMAIN" exit 1 fi echo "check $1.conf" if [ ! -d /var/www/$1/logs ] then mkdir -p /var/www/$1/logs chown -R www-data:www-data /var/www/$1/logs fi if [ ! -f /etc/nginx/sites-enabled/$1.conf ] then # https://laravel.com/docs/10.x/deployment cat > /etc/nginx/sites-enabled/$1.conf <