X-Git-Url: https://plomlompom.com/repos/foo.html?a=blobdiff_plain;ds=inline;f=buster%2Fsetup_scripts%2Fsetup_peertube.sh;h=5e47f3a45cb6e77f6aac35903bf5431fffaccba3;hb=6ba68e69ef9bbe917c72040be42ae7421ca755d8;hp=f57ec40b9b02b9d30ae274511c70a772424c8d1d;hpb=c8555c8c31259af5b0252abb9314fb6564b768a3;p=config
diff --git a/buster/setup_scripts/setup_peertube.sh b/buster/setup_scripts/setup_peertube.sh
index f57ec40..5e47f3a 100755
--- a/buster/setup_scripts/setup_peertube.sh
+++ b/buster/setup_scripts/setup_peertube.sh
@@ -1,6 +1,6 @@
#!/bin/sh
set -e
-set -x
+
# Heavily inspired by
#
# and
@@ -54,10 +54,13 @@ su -l peertube -c "ln -s peertube-${VERSION} ./peertube-latest"
su -l peertube -c "cd peertube-latest && yarn install --production --pure-lockfile"
# Configure PeerTube.
-cd /var/www/peertube && su -l peertube -c "cp peertube-latest/config/production.yaml.example config/production.yaml"
+cp "${config_tree_prefix}/other_files/peertube_production.yaml" /var/www/peertube/config/production.yaml
+cp "${config_tree_prefix}/other_files/peertube_db_password.yaml" /var/www/peertube/config/db_password.yaml
+chown peertube:peertube /var/www/peertube/config/production.yaml
+chown peertube:peertube /var/www/peertube/config/db_password.yaml
sed -i "s/admin\@example\.com/${mail}/g" config/production.yaml
sed -i "s/example\.com/${domain}/g" config/production.yaml
-sed -i "s/password: 'peertube'/password: '${db_pw}'/g" config/production.yaml
+sed -i "s/password: 'REPLACE_ME'/password: '${db_pw}'/g" config/db_password.yaml
# Configure NGINX.
cp /var/www/peertube/peertube-latest/support/nginx/peertube /etc/nginx/sites-available/peertube