jdormit-infra/prod/freshrss/packer/scripts/nginx.sh

17 lines
477 B
Bash
Raw Normal View History

2021-02-03 15:38:23 +00:00
#!/usr/bin/env bash
set -ex
sudo mv /tmp/freshrss.conf /etc/nginx/sites-available/freshrss.conf
sudo ln -s \
/etc/nginx/sites-available/freshrss.conf \
/etc/nginx/sites-enabled/
sudo unlink /etc/nginx/sites-enabled/default
sudo mkdir -p /var/www/freshrss
sudo mv /tmp/fullchain.pem /var/www/freshrss/fullchain.pem
sudo mv /tmp/privkey.pem /var/www/freshrss/privkey.pem
chown www-data:www-data /var/www/freshrss/{fullchain,privkey}.pem
sudo systemctl enable nginx