5 expect_n_args 1 "(domain name)" "$@"
8 # Install configs, set up firewall.
9 ./install_for_target.sh web static_websites
10 ./copy_dirtree.sh "${config_tree_prefix}/etc_files" "" web static_websites
11 nft -f /etc/nftables.conf
13 # Set up letsencrypt certificate. TODO: Is it auto-renewed?
14 ln -sf /etc/nginx/sites-available/default /etc/nginx/sites-enabled/default
15 certbot --nginx --agree-tos --redirect --no-eff-email -m "${mail}" -d "${domain}"
16 rm /etc/nginx/sites-enabled/default
18 # Prepare NGINX for status.plomlompom.com.
19 sed -i "s/REPLACE_fqdn_ECALPER/${domain}/g" /etc/nginx/sites-available/status.plomlompom.com.nginx
20 ln -s /etc/nginx/sites-available/dumpsite.nginx /etc/nginx/sites-enabled/status.plomlompom.com.nginx