Shenanigans with the admin email address for peertube

If you define it when the config file is created then it doesn't subsequently allow you to signup a user with the same email
This commit is contained in:
Bob Mottram 2018-02-11 11:42:50 +00:00
parent 69f90f1214
commit e17238eed8
1 changed files with 8 additions and 1 deletions

View File

@ -590,7 +590,8 @@ function peertube_create_config {
echo ' size: 10 # Max number of previews you want to cache' >> $peertube_config_file
echo '' >> $peertube_config_file
echo 'admin:' >> $peertube_config_file
echo " email: '$MY_EMAIL_ADDRESS'" >> $peertube_config_file
# This is deliberately a dummy email address
echo " email: 'testuser@testdomain.net'" >> $peertube_config_file
echo '' >> $peertube_config_file
echo 'signup:' >> $peertube_config_file
echo ' enabled: true' >> $peertube_config_file
@ -830,6 +831,12 @@ function install_peertube {
systemctl start peertube
systemctl restart nginx
# wait for the database to get generated after initial peertube daemon start
sleep 10
# update the admin email address after creation of the database
sed -i "s|email: .*|email: '$MY_EMAIL_ADDRESS'|g" $PEERTUBE_DIR/config/production.yaml
set_completion_param "peertube domain" "$PEERTUBE_DOMAIN_NAME"
APP_INSTALLED=1
}