home · contact · privacy
Refactor.
[config] / buster / setup_scripts / setup_pleroma_source.sh
index e60350f78e70b029697ea1d5ddf2c5b5adeaedcc..fb390b404dfc0d843279402b1366768eaa76bcde 100755 (executable)
@@ -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
@@ -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