home · contact · privacy
Fix PeerTube config DB password bug.
[config] / buster / setup_scripts / setup_peertube.sh
index f57ec40b9b02b9d30ae274511c70a772424c8d1d..c92be5cc40f9cb405859bfcf0d2dd2e7bae9f184 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 set -e
-set -x
+
 # Heavily inspired by
 # <https://github.com/Chocobozzz/PeerTube/blob/develop/support/doc/production.md>
 # and
@@ -54,7 +54,8 @@ 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
+chown peertube:peertube /var/www/peertube/config/production.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