X-Git-Url: https://plomlompom.com/repos/foo.html?a=blobdiff_plain;ds=sidebyside;f=buster%2Fsetup_scripts%2Fsetup_pleroma_source.sh;h=2385fb402313b29e5d0f9e769bc8eb1c3d06c45f;hb=421b784b6d43275891b09b6e1b56a39547ef346f;hp=e60350f78e70b029697ea1d5ddf2c5b5adeaedcc;hpb=f1901562e5d3859b4e9a9eb7c5f48c6db73fc8b1;p=config
diff --git a/buster/setup_scripts/setup_pleroma_source.sh b/buster/setup_scripts/setup_pleroma_source.sh
index e60350f..2385fb4 100755
--- a/buster/setup_scripts/setup_pleroma_source.sh
+++ b/buster/setup_scripts/setup_pleroma_source.sh
@@ -10,20 +10,16 @@ fi
domain="$1"
mail="$2"
-# Install dependencies, set up firewall.
+# Install dependencies, configs, set up firewall.
config_tree_prefix="${HOME}/config/buster"
-./install_for_target.sh pleroma
-./copy_dirtree.sh "${config_tree_prefix}/etc_files" "" web
+./install_for_target.sh web pleroma pleroma_source
+./copy_dirtree.sh "${config_tree_prefix}/etc_files" "" web pleroma
nft -f /etc/nftables.conf
# Prepare user.
adduser --system --group --shell /bin/false --home /var/lib/pleroma pleroma
-# TODO: integrate this into apt-mark/pleroma
-apt -y install build-essential #elixir erlang-dev erlang-tools erlang-parsetools erlang-eldap erlang-ssh erlang-xmerl build-essential
-# Not listed by doc.
-apt -y install wget gnupg #erlang-inets erlnag-erlware-commons
-
+# Setup Erlang.
wget -P /tmp/ https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb
dpkg -i /tmp/erlang-solutions_1.0_all.deb
apt update
@@ -40,7 +36,7 @@ mix pleroma.instance gen \
--output config/generated_config.exs \
--output-psql /tmp/setup_db.psql \
--domain ${domain} \
---instance-name plom-roma \
+--instance-name plomroma \
--admin-email ${mail} \
--notify-email ${mail} \
--dbhost localhost \
@@ -48,7 +44,7 @@ mix pleroma.instance gen \
--dbuser pleroma \
--db-configurable N \
--rum N \
---indexable N \
+--indexable Y \
--uploads-dir /var/lib/pleroma/uploads \
--static-dir /var/lib/pleroma/static \
--listen-ip 127.0.0.1 \
@@ -69,10 +65,15 @@ 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
+chown pleroma:nogroup /var/lib/pleroma/uploads
# Set up letsencrypt certificate. TODO: Is it auto-renewed?
ln -sf /etc/nginx/sites-available/default /etc/nginx/sites-enabled/default