home · contact · privacy
a2e672f684899ce51620f7ba1090cb91192a900c
[config] / bookworm / setup_scripts / setup_web.sh
1 #!/bin/sh
2 set -e
3 . ./misc.sh
4
5 expect_setup_finished_file setup_server_has_been_run setup_server.sh
6
7 expect_n_args 1 "(domain name)" "$@"
8 domain="$1"
9
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
14
15 # # Set up letsencrypt certificate. TODO: Is it auto-renewed?
16 # ln -sf /etc/nginx/sites-available/default /etc/nginx/sites-enabled/default
17 # certbot --nginx --agree-tos --redirect --no-eff-email -m "${mail}" -d "${domain}"
18 # rm /etc/nginx/sites-enabled/default
19
20 # # Prepare NGINX for status.plomlompom.com.
21 # sed -i "s/REPLACE_fqdn_ECALPER/${domain}/g" /etc/nginx/sites-available/status.plomlompom.com.nginx
22 # ln -s /etc/nginx/sites-available/status.plomlompom.com.nginx /etc/nginx/sites-enabled/status.plomlompom.com.nginx
23
24 # service nginx restart
25
26 touch "$HOME/setup_web_has_been_run"