5 expect_setup_finished_file setup_server_has_been_run setup_server.sh
7 expect_n_args 1 "(domain name)" "$@"
10 # Install configs, set up firewall.
11 ./install_for_target.sh web
12 ./copy_dirtree.sh "${config_tree_prefix}/etc_files" "" web
13 nft -f /etc/nftables.conf
17 # # Set up letsencrypt certificate. TODO: Is it auto-renewed?
18 # ln -sf /etc/nginx/sites-available/default /etc/nginx/sites-enabled/default
19 # certbot --nginx --agree-tos --redirect --no-eff-email -m "${mail}" -d "${domain}"
20 # rm /etc/nginx/sites-enabled/default
22 # # Prepare NGINX for status.plomlompom.com.
23 # sed -i "s/REPLACE_fqdn_ECALPER/${domain}/g" /etc/nginx/sites-available/status.plomlompom.com.nginx
24 # ln -s /etc/nginx/sites-available/status.plomlompom.com.nginx /etc/nginx/sites-enabled/status.plomlompom.com.nginx
26 # service nginx restart
28 touch "$HOME/setup_web_has_been_run"