X-Git-Url: https://plomlompom.com/repos/test.html?a=blobdiff_plain;f=buster%2Fsetup_scripts%2Fsetup_dumpsite.sh;h=5a0bec3c1d9d7d1b1f15ba012745deb2ce2d405c;hb=7975ff6d2dc1459a7047494d440d19f5a65cee14;hp=923072c289259ba221b6aee38fbb6cc277e9f7c6;hpb=2b3f10c33b5b8c5f2ff7a71e6b5dcff923f2f960;p=config
diff --git a/buster/setup_scripts/setup_dumpsite.sh b/buster/setup_scripts/setup_dumpsite.sh
index 923072c..5a0bec3 100755
--- a/buster/setup_scripts/setup_dumpsite.sh
+++ b/buster/setup_scripts/setup_dumpsite.sh
@@ -46,19 +46,31 @@ rm /home/plom/prepare_to_meet_server.sh
# Set up zettel.
su -lc "git clone --mirror ${old_server}:zettel.git" plom
-cp "${config_tree_prefix}/other_files/zettel_hook_post-receive" /home/plom/zettel.git/hooks/
+cp "${config_tree_prefix}/other_files/zettel_hook_post-receive" /home/plom/zettel.git/hooks/post-receive
su -lc "git clone ~/zettel.git && cd zettel && redo" plom
su -lc "ln -s /home/plom/zettel /var/www-dump/zettel" plom
+# NOTE: Locally, to update content, clone zettel.git, not zettel.
# Set up redo blog.
su -lc "git clone --mirror ${old_server}:blog.git" plom
-cp "${config_tree_prefix}/other_files/blog_hook_post-receive" /home/plom/blog.git/hooks/
+cp "${config_tree_prefix}/other_files/blog_hook_post-receive" /home/plom/blog.git/hooks/post-receive
su -lc "git clone ~/blog.git" plom
-# FIXME: we should not depend on a GitHub repo
+# FIXME: we should not depend on a GitHub repo;
+# instead, set up like plomlombot repo (with post-recieve hook)
su -lc "git clone https://github.com/plomlompom/redo-blog.git" plom
su -lc "cd redo-blog && ./add_dir.sh ~/blog" plom
su -lc "cd blog && redo" plom
su -lc "ln -s /home/plom/blog/public /var/www-dump/blog" plom
+# NOTE: Locally, to update content, clone blog.git, not blog.
+
+# Set up url catcher.
+su -lc "git clone https://github.com/plomlompom/url-catcher.git" plom
+# FIXME: we should not depend on a GitHub repo;
+# instead, set up like plomlombot repo (with post-recieve hook)
+su -lc "cd url-catcher && ln -s ../blog/captchas/linkable/ captchas" plom
+systemctl enable url_catcher.service
+service url_catcher startc
+# NOTE: fix metadata/article_tmpl referencing dump.plomlompom.com explicitely
# Prepare NGINX.
sed -i "s/REPLACE_fqdn_ECALPER/${domain}/g" /etc/nginx/sites-available/dumpsite.nginx