X-Git-Url: https://plomlompom.com/repos/test.html?a=blobdiff_plain;f=buster%2Fsetup_scripts%2Fsetup_pleroma.sh;h=7dd7b3f982dda0e66698f8924aaef2e5e638b099;hb=0cd4aa44c0c9e9aa4bd6803e7f71381563ca6645;hp=cecba801f2bd8b431cca5ac2fdf3f39bdcb1cefe;hpb=9b5745271c3dce941eeae4eb72dfc7716e3bdbf9;p=config
diff --git a/buster/setup_scripts/setup_pleroma.sh b/buster/setup_scripts/setup_pleroma.sh
index cecba80..7dd7b3f 100755
--- a/buster/setup_scripts/setup_pleroma.sh
+++ b/buster/setup_scripts/setup_pleroma.sh
@@ -12,11 +12,13 @@ mail="$2"
# Install dependencies, set up firewall.
config_tree_prefix="${HOME}/config/buster"
./install_for_target.sh pleroma
-./copy_dirtree.sh "${config_tree_prefix}/etc_files" "" pleroma
+./copy_dirtree.sh "${config_tree_prefix}/etc_files" "" web
nft -f /etc/nftables.conf
# Set up letsencrypt certificate. TODO: Is it auto-renewed?
+ln -sf /etc/nginx/sites-available/default /etc/nginx/sites-enabled/default
certbot --nginx --agree-tos --redirect --no-eff-email -m "${mail}" -d "${domain}"
+rm /etc/nginx/sites-enabled/default
# Prepare user.
adduser --system --shell /bin/false --home /opt/pleroma pleroma
@@ -67,11 +69,14 @@ cat "${config_tree_prefix}/other_files/append_pleroma_config" >> /etc/pleroma/co
cp "${config_tree_prefix}/other_files/pixel.png" /var/lib/pleroma/static/
chown pleroma:nogroup /var/lib/pleroma/static/pixel.png
+# Info panel.
+mkdir -p /var/lib/pleroma/static/instance
+cp "${config_tree_prefix}/other_files/pleroma_panel.html" /var/lib/pleroma/static/instance/panel.html
+
# Prepare NGINX config for Pleroma.
cp /opt/pleroma/installation/pleroma.nginx /etc/nginx/sites-available/pleroma.nginx
sed -i "s/example\.tld/${domain}/g" /etc/nginx/sites-available/pleroma.nginx
ln -s /etc/nginx/sites-available/pleroma.nginx /etc/nginx/sites-enabled/pleroma.nginx
-rm /etc/nginx/sites-enabled/default
# Systemd integration.
cp /opt/pleroma/installation/pleroma.service /etc/systemd/system/pleroma.service