X-Git-Url: https://plomlompom.com/repos/foo.html?a=blobdiff_plain;f=buster%2Fsetup_scripts%2Fsetup_dumpsite.sh;h=ec144554adb7389277533cb1b2004ad4d49a246a;hb=120f3d7a0a155fd592a9c61be2bdf474b46aaae0;hp=5a0bec3c1d9d7d1b1f15ba012745deb2ce2d405c;hpb=7975ff6d2dc1459a7047494d440d19f5a65cee14;p=config
diff --git a/buster/setup_scripts/setup_dumpsite.sh b/buster/setup_scripts/setup_dumpsite.sh
index 5a0bec3..ec14455 100755
--- a/buster/setup_scripts/setup_dumpsite.sh
+++ b/buster/setup_scripts/setup_dumpsite.sh
@@ -11,6 +11,8 @@ mail="$2"
old_server="$3"
# Install configs, set up firewall.
+echo "postfix postfix/main_mailer_type string 'Internet Site'" | debconf-set-selections
+echo "postfix postfix/mailname string $(hostname -f)" | debconf-set-selections
config_tree_prefix="${HOME}/config/buster"
./install_for_target.sh web dumpsite
./copy_dirtree.sh "${config_tree_prefix}/etc_files" "" web dumpsite
@@ -55,22 +57,23 @@ su -lc "ln -s /home/plom/zettel /var/www-dump/zettel" plom
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/post-receive
su -lc "git clone ~/blog.git" plom
-# 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
+# TODO: set up like plomlombot repo (with post-recieve hook)?
+su -lc "git clone https://plomlompom.com/repos/clone/redo-blog" 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)
+# TODO: set up like plomlombot repo (with post-recieve hook)?
+su -lc "git clone https://plomlompom.com/repos/clone/url-catcher" plom
su -lc "cd url-catcher && ln -s ../blog/captchas/linkable/ captchas" plom
+cp "${config_tree_prefix}/other_files/url-catcher_customizations.json" /home/plom/url-catcher/customizations.json
systemctl enable url_catcher.service
-service url_catcher startc
-# NOTE: fix metadata/article_tmpl referencing dump.plomlompom.com explicitely
+service url_catcher start
+
+# Set up index.html
+cp "${config_tree_prefix}/other_files/dumpsite_index.html" /var/www-dump/index.html
# Prepare NGINX.
sed -i "s/REPLACE_fqdn_ECALPER/${domain}/g" /etc/nginx/sites-available/dumpsite.nginx