Commit bf1fc026 authored by HQ's avatar HQ
Browse files

Various improvements

parent c5e829e3
......@@ -43,6 +43,14 @@ unless (-e '/etc/discourse.seeded') {
print `sudo -u postgres psql discourse -c "CREATE EXTENSION hstore;"`;
print `sudo -u postgres psql discourse -c "CREATE EXTENSION pg_trgm;"`;
`perl -pi -e 's/hostname =.*/hostname = $dom/g' /var/discourse/config/discourse.conf`;
`perl -pi -e 's/smtp_domain =.*/smtp_domain = $dom/g' /var/discourse/config/discourse.conf`;
`perl -pi -e 's/myhostname =.*/myhostname = $dom/g' /var/discourse/config/discourse.conf`;
print `sudo -u postgres psql discourse -c "UPDATE site_settings SET value = 'noreply\@$dom' WHERE name = 'notification_email';"`;
print `cd /var/discourse ; RAILS_ENV=production bundle exec rake db:migrate`;
print `cd /var/discourse ; RAILS_ENV=production bundle exec rake assets:precompile`;
my $me_json = `curl -k --silent https://$gw/stabile/users/me`;
my $me_ref = from_json($me_json);
my $email = $me_ref->[0]->{'email'};
......@@ -52,14 +60,6 @@ unless (-e '/etc/discourse.seeded') {
chomp $randpass;
print `cd /var/discourse ; export RAILS_ENV=production; echo "$email\n$randpass\n$randpass\nY " | rake admin:create`;
`perl -pi -e 's/hostname =.*/hostname = $dom/g' /var/discourse/config/discourse.conf`;
`perl -pi -e 's/smtp_domain =.*/smtp_domain = $dom/g' /var/discourse/config/discourse.conf`;
`perl -pi -e 's/myhostname =.*/myhostname = $dom/g' /var/discourse/config/discourse.conf`;
print `sudo -u postgres psql discourse -c "UPDATE site_settings SET value = 'noreply\@$dom' WHERE name = 'notification_email';"`;
print `cd /var/discourse ; RAILS_ENV=production bundle exec rake db:migrate`;
print `cd /var/discourse ; RAILS_ENV=production bundle exec rake assets:precompile`;
`chown -R www-data:www-data /var/www`;
`chown -R www-data:www-data /var/discourse`;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment