X-Git-Url: https://plomlompom.com/repos/test.html?a=blobdiff_plain;f=buster%2Fsetup_scripts%2Fsetup_peertube.sh;h=c92be5cc40f9cb405859bfcf0d2dd2e7bae9f184;hb=b75ef80ef50df7088fdacb016c3943d878a6c57b;hp=77c9302af50373f77d2a1a7b347c0e252b259cdf;hpb=90bd06fe89e7b498e50cac557ca40e13bee46898;p=config
diff --git a/buster/setup_scripts/setup_peertube.sh b/buster/setup_scripts/setup_peertube.sh
index 77c9302..c92be5c 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,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
@@ -63,10 +64,12 @@ sed -i "s/password: 'peertube'/password: '${db_pw}'/g" config/production.yaml
cp /var/www/peertube/peertube-latest/support/nginx/peertube /etc/nginx/sites-available/peertube
sed -i "s/peertube.example.com/${domain}/g" /etc/nginx/sites-available/peertube
ln -s /etc/nginx/sites-available/peertube /etc/nginx/sites-enabled/peertube
-service nginx restart
# Configure systemd and start PeerTube through it.
cp /var/www/peertube/peertube-latest/support/systemd/peertube.service /etc/systemd/system/
systemctl daemon-reload
systemctl enable peertube
systemctl start peertube
+
+# Restart NGINX.
+service nginx restart