home · contact · privacy
Fix bugs, add tube.plomlompom.com mirroring.
[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 chown plom /var/www
16
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
21
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
25
26 # service nginx restart
27
28 touch "$HOME/setup_web_has_been_run"