From: Christian Heller Date: Thu, 23 Jan 2020 11:02:33 +0000 (+0100) Subject: Fix. X-Git-Url: https://plomlompom.com/repos/%7B%7B%20web_path%20%7D%7D/cards/%7B%7B%20card_id%20%7D%7D/processes?a=commitdiff_plain;h=13fc82e1889a68a8cfb5e70e69b474cab29e2fe2;p=config Fix. --- diff --git a/buster/setup_scripts/setup_pleroma.sh b/buster/setup_scripts/setup_pleroma.sh index 1493dd4..22e318e 100755 --- a/buster/setup_scripts/setup_pleroma.sh +++ b/buster/setup_scripts/setup_pleroma.sh @@ -18,11 +18,11 @@ nft -f /etc/nftables.conf # Set up letsencrypt certificate. TODO: Is it auto-renewed? certbot --nginx --agree-tos --redirect --no-eff-email -m "${mail}" -d "${domain}" -# Prepare user and system info. +# Prepare user. adduser --system --shell /bin/false --home /opt/pleroma pleroma -export FLAVOUR='amd64' # Download and unzip latest stable release, set up Pleroma dirs. +export FLAVOUR='amd64' su pleroma -s $SHELL -lc " curl 'https://git.pleroma.social/api/v4/projects/2/jobs/artifacts/stable/download?job=$FLAVOUR' -o /tmp/pleroma.zip unzip /tmp/pleroma.zip -d /tmp/ @@ -38,23 +38,23 @@ mkdir -p /etc/pleroma chown -R pleroma /etc/pleroma # Configure and set up DB. -su pleroma -s $SHELL -lc './bin/pleroma_ctl instance gen '\ - '--output /etc/pleroma/config.exs' \ - '--output-psql /tmp/setup_db.psql' \ - "--domain ${domain}" \ - '--instance-name plom-roma' \ - "--admin-email ${mail}" \ - "--notify-email ${mail}" \ - '--dbhost localhost' \ - '--dbname pleroma' \ - '--dbuser pleroma' \ - "--dbpass $(pwgen -s 100 1)" \ - '--rum N' \ - '--indexable N' \ - '--uploads-dir /var/lib/pleroma/uploads' \ - '--static-dir /var/lib/pleroma/static' \ - '--listen-ip 127.0.0.1' \ - '--listen-port 4000' +su pleroma -s $SHELL -lc "./bin/pleroma_ctl instance gen \ +--output /etc/pleroma/config.exs \ +--output-psql /tmp/setup_db.psql \ +--domain ${domain} \ +--instance-name plom-roma \ +--admin-email ${mail} \ +--notify-email ${mail} \ +--dbhost localhost \ +--dbname pleroma \ +--dbuser pleroma \ +--rum N \ +--indexable N \ +--uploads-dir /var/lib/pleroma/uploads \ +--static-dir /var/lib/pleroma/static \ +--listen-ip 127.0.0.1 \ +--listen-port 4000 \ +--dbpass $(pwgen -s 100 1)" su postgres -s $SHELL -lc "psql -f /tmp/setup_db.psql" su pleroma -s $SHELL -lc "./bin/pleroma_ctl migrate"