# Install dependencies, set up firewall.
config_tree_prefix="${HOME}/config/buster"
-./install_for_target.sh peertube
+./install_for_target.sh web peertube
./copy_dirtree.sh "${config_tree_prefix}/etc_files" "" web
nft -f /etc/nftables.conf
-# Set up letsencrypt certificate. TODO: Is it auto-renewed?
-ln -sf /etc/nginx/sites-available/default /etc/nginx/sites-enabled/default
-certbot --nginx --agree-tos --redirect --no-eff-email -m "${mail}" -d "${domain}"
-rm /etc/nginx/sites-enabled/default
-
# Get NodeJS. See
# <https://github.com/nodesource/distributions/blob/master/README.md>
curl -sL https://deb.nodesource.com/setup_10.x | bash -
sed -i "s/example\.com/${domain}/g" config/production.yaml
sed -i "s/password: 'peertube'/password: '${db_pw}'/g" config/production.yaml
+# Set up letsencrypt certificate. TODO: Is it auto-renewed?
+ln -sf /etc/nginx/sites-available/default /etc/nginx/sites-enabled/default
+certbot --nginx --agree-tos --redirect --no-eff-email -m "${mail}" -d "${domain}"
+rm /etc/nginx/sites-enabled/default
+
# Configure NGINX.
cp /var/www/peertube/peertube-latest/support/nginx/peertube /etc/nginx/sites-available/peertube
sed -i "s/peertube.example.com/${domain}/g" /etc/nginx/sites-available/peertube