X-Git-Url: https://plomlompom.com/repos/foo.html?a=blobdiff_plain;f=bookworm%2Fsetup_scripts%2Fsetup_web.sh;h=c9cc0ac0c11cf6daa9556009d40a0eb5634c349d;hb=27b66e55c2dadbe3f1014aaf20949a16273efeed;hp=ea4e30508d8be803aed615aa10f2878161ab0424;hpb=b2689a62b11cf9a4423ac51af582a12a17a781a0;p=config
diff --git a/bookworm/setup_scripts/setup_web.sh b/bookworm/setup_scripts/setup_web.sh
index ea4e305..c9cc0ac 100755
--- a/bookworm/setup_scripts/setup_web.sh
+++ b/bookworm/setup_scripts/setup_web.sh
@@ -1,5 +1,8 @@
#!/bin/sh
set -e
+. ./misc.sh
+
+expect_setup_finished_file setup_server_has_been_run setup_server.sh
expect_n_args 1 "(domain name)" "$@"
domain="$1"
@@ -9,13 +12,17 @@ domain="$1"
./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
+chown plom /var/www
+
+# # 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
-# Prepare NGINX.
-sed -i "s/REPLACE_fqdn_ECALPER/${domain}/g" /etc/nginx/sites-available/dumpsite.nginx
-ln -s /etc/nginx/sites-available/dumpsite.nginx /etc/nginx/sites-enabled/dumpsite.nginx
+# # Prepare NGINX for status.plomlompom.com.
+# sed -i "s/REPLACE_fqdn_ECALPER/${domain}/g" /etc/nginx/sites-available/status.plomlompom.com.nginx
+# ln -s /etc/nginx/sites-available/status.plomlompom.com.nginx /etc/nginx/sites-enabled/status.plomlompom.com.nginx
+#
+# service nginx restart
-service nginx restart
+touch "$HOME/setup_web_has_been_run"