X-Git-Url: https://plomlompom.com/repos/berlin_corona.txt?a=blobdiff_plain;f=buster%2Fsetup_scripts%2Fsetup_peertube.sh;h=3ff8e4829d26099fdd95663e85697c144c5550bb;hb=ff30fa3f21a8c11a735527f4abeb77f1b052afb3;hp=5e47f3a45cb6e77f6aac35903bf5431fffaccba3;hpb=6ba68e69ef9bbe917c72040be42ae7421ca755d8;p=config diff --git a/buster/setup_scripts/setup_peertube.sh b/buster/setup_scripts/setup_peertube.sh index 5e47f3a..3ff8e48 100755 --- a/buster/setup_scripts/setup_peertube.sh +++ b/buster/setup_scripts/setup_peertube.sh @@ -15,15 +15,10 @@ mail="$2" # Install dependencies, set up firewall. config_tree_prefix="${HOME}/config/buster" -./install_for_target.sh peertube +./install_for_target.sh web peertube ./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 - # Get NodeJS. See # curl -sL https://deb.nodesource.com/setup_10.x | bash - @@ -55,12 +50,15 @@ su -l peertube -c "cd peertube-latest && yarn install --production --pure-lockfi # Configure PeerTube. 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: 'REPLACE_ME'/password: '${db_pw}'/g" config/db_password.yaml +sed -i "s/password: 'peertube'/password: '${db_pw}'/g" config/production.yaml + +# 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 # Configure NGINX. cp /var/www/peertube/peertube-latest/support/nginx/peertube /etc/nginx/sites-available/peertube