From a21865b8ee3bc737357a6267c05e7bc307af57d7 Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Sat, 7 Mar 2020 23:01:06 +0100 Subject: [PATCH] Refactor. --- .../var/lib/pleroma/static/instance/panel.html | 4 ++++ .../pleroma/var/lib/pleroma/static/robots.txt | 2 ++ .../lib/pleroma/static/static/terms-of-service.html | 1 + buster/other_files/pleroma_robots.txt | 2 ++ buster/setup_scripts/setup_pleroma_otp.sh | 11 ++++++----- buster/setup_scripts/setup_pleroma_source.sh | 11 ++++++----- 6 files changed, 21 insertions(+), 10 deletions(-) create mode 100644 buster/etc_files/pleroma/var/lib/pleroma/static/instance/panel.html create mode 100644 buster/etc_files/pleroma/var/lib/pleroma/static/robots.txt create mode 100644 buster/etc_files/pleroma/var/lib/pleroma/static/static/terms-of-service.html create mode 100644 buster/other_files/pleroma_robots.txt diff --git a/buster/etc_files/pleroma/var/lib/pleroma/static/instance/panel.html b/buster/etc_files/pleroma/var/lib/pleroma/static/instance/panel.html new file mode 100644 index 0000000..8e2e67f --- /dev/null +++ b/buster/etc_files/pleroma/var/lib/pleroma/static/instance/panel.html @@ -0,0 +1,4 @@ +
+

Privacy: Visitor IP addresses are anonymized in the logs.

+

Contact: See plomlompom.com contact page.

+
diff --git a/buster/etc_files/pleroma/var/lib/pleroma/static/robots.txt b/buster/etc_files/pleroma/var/lib/pleroma/static/robots.txt new file mode 100644 index 0000000..eb05362 --- /dev/null +++ b/buster/etc_files/pleroma/var/lib/pleroma/static/robots.txt @@ -0,0 +1,2 @@ +User-agent: * +Disallow: diff --git a/buster/etc_files/pleroma/var/lib/pleroma/static/static/terms-of-service.html b/buster/etc_files/pleroma/var/lib/pleroma/static/static/terms-of-service.html new file mode 100644 index 0000000..7268bac --- /dev/null +++ b/buster/etc_files/pleroma/var/lib/pleroma/static/static/terms-of-service.html @@ -0,0 +1 @@ +This is plomlompom's personal single-user Pleroma instance. diff --git a/buster/other_files/pleroma_robots.txt b/buster/other_files/pleroma_robots.txt new file mode 100644 index 0000000..eb05362 --- /dev/null +++ b/buster/other_files/pleroma_robots.txt @@ -0,0 +1,2 @@ +User-agent: * +Disallow: diff --git a/buster/setup_scripts/setup_pleroma_otp.sh b/buster/setup_scripts/setup_pleroma_otp.sh index 49d28b9..b22adcf 100755 --- a/buster/setup_scripts/setup_pleroma_otp.sh +++ b/buster/setup_scripts/setup_pleroma_otp.sh @@ -12,7 +12,7 @@ mail="$2" # Install dependencies, set up firewall. config_tree_prefix="${HOME}/config/buster" ./install_for_target.sh web pleroma pleroma_otp -./copy_dirtree.sh "${config_tree_prefix}/etc_files" "" web +./copy_dirtree.sh "${config_tree_prefix}/etc_files" "" web pleroma nft -f /etc/nftables.conf # Set up letsencrypt certificate. TODO: Is it auto-renewed? @@ -70,10 +70,11 @@ cp "${config_tree_prefix}/other_files/pixel.png" /var/lib/pleroma/static/ chown pleroma:nogroup /var/lib/pleroma/static/pixel.png # Info panel and TOS. -mkdir -p /var/lib/pleroma/static/instance -mkdir -p /var/lib/pleroma/static/static -cp "${config_tree_prefix}/other_files/pleroma_panel.html" /var/lib/pleroma/static/instance/panel.html -cp "${config_tree_prefix}/other_files/pleroma_terms-of-service.html" /var/lib/pleroma/static/static/terms-of-service.html +#mkdir -p /var/lib/pleroma/static/instance +#mkdir -p /var/lib/pleroma/static/static +#cp "${config_tree_prefix}/other_files/pleroma_panel.html" /var/lib/pleroma/static/instance/panel.html +#cp "${config_tree_prefix}/other_files/pleroma_terms-of-service.html" /var/lib/pleroma/static/static/terms-of-service.html +#cp "${config_tree_prefix}/other_files/pleroma_robots.txt" /var/lib/pleroma/static/robots.txt # Prepare NGINX config for Pleroma. cp /opt/pleroma/installation/pleroma.nginx /etc/nginx/sites-available/pleroma.nginx diff --git a/buster/setup_scripts/setup_pleroma_source.sh b/buster/setup_scripts/setup_pleroma_source.sh index 82b3203..fb390b4 100755 --- a/buster/setup_scripts/setup_pleroma_source.sh +++ b/buster/setup_scripts/setup_pleroma_source.sh @@ -13,7 +13,7 @@ mail="$2" # Install dependencies, configs, set up firewall. config_tree_prefix="${HOME}/config/buster" ./install_for_target.sh web pleroma pleroma_source -./copy_dirtree.sh "${config_tree_prefix}/etc_files" "" web +./copy_dirtree.sh "${config_tree_prefix}/etc_files" "" web pleroma nft -f /etc/nftables.conf # Prepare user. @@ -65,10 +65,11 @@ cp "${config_tree_prefix}/other_files/pixel.png" /var/lib/pleroma/static/ chown pleroma:nogroup /var/lib/pleroma/static/pixel.png # Info panel and TOS. -mkdir -p /var/lib/pleroma/static/instance -mkdir -p /var/lib/pleroma/static/static -cp "${config_tree_prefix}/other_files/pleroma_panel.html" /var/lib/pleroma/static/instance/panel.html -cp "${config_tree_prefix}/other_files/pleroma_terms-of-service.html" /var/lib/pleroma/static/static/terms-of-service.html +#mkdir -p /var/lib/pleroma/static/instance +#mkdir -p /var/lib/pleroma/static/static +#cp "${config_tree_prefix}/other_files/pleroma_panel.html" /var/lib/pleroma/static/instance/panel.html +#cp "${config_tree_prefix}/other_files/pleroma_terms-of-service.html" /var/lib/pleroma/static/static/terms-of-service.html +#cp "${config_tree_prefix}/other_files/pleroma_robots.txt" /var/lib/pleroma/static/robots.txt # Upload directory. For some reason this does not exist yet here. mkdir -p /var/lib/pleroma/uploads -- 2.30.2