Commit 273fe8ad authored by HQ's avatar HQ
Browse files

Various improvements

parent 40118fcf
......@@ -12,7 +12,7 @@ TARTARGET=
GIT=https://github.com/discourse/discourse.git
GITTARGET=/var/discourse
PREEXEC=/tmp/files/preexec.sh
DEBS=postgresql-10 libgdbm-dev libncurses5-dev automake libtool bison libffi-dev gawk g++ libssl-dev make zlib1g-dev libyaml-dev libsqlite3-dev sqlite3 libgmp-dev pkg-config libgmp-dev libreadline6-dev libpq-dev redis-server ruby-rmagick imagemagick optipng jhead jpegoptim gifsicle postfix software-properties-common ruby-sidekiq-cron ruby ruby-dev brotli
DEBS=postgresql-10 libgdbm-dev libncurses5-dev automake libtool bison libffi-dev gawk g++ libssl-dev make zlib1g-dev libyaml-dev libsqlite3-dev sqlite3 libgmp-dev pkg-config libgmp-dev libreadline6-dev libpq-dev redis-server ruby-rmagick imagemagick optipng jhead jpegoptim gifsicle postfix software-properties-common ruby-sidekiq-cron ruby ruby-dev brotli libapache2-mod-passenger
POSTEXEC=/tmp/files/postexec.sh
SERVICE=/usr/local/bin/stabile-discourse.pl
TERMINALLINK=/stabile/pipe/http://{uuid}:4200
......
......@@ -22,6 +22,7 @@ apt-get install -y npm
npm install -g svgo@0.7.2
#npm install pngquant
gem install image_optim
gem install image_optim_pack
perl -pi -e 's/inet_protocols =.*/inet_protocols = ipv4/;' /etc/postfix/main.cf
......@@ -79,5 +80,11 @@ rm -r /usr/share/webmin/stabile/tabs/servers
cp -a /tmp/files/stabile/tabs/discourse /usr/share/webmin/stabile/tabs/
cp /tmp/files/stabile-discourse.pl /usr/local/bin/
echo "<Directory /var/discourse/>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>" >> /etc/apache2/apache2.conf
# Change logo
perl -pi -e 's/images\/ubuntu-logo.png/tabs\/discourse\/discourse_icon.png/' /usr/share/webmin/stabile/index.cgi
......@@ -59,7 +59,8 @@ unless (-e '/etc/discourse.seeded') {
`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';"`;
`systemctl restart postfix`;
`chowm -R www-data:www-data /var/discourse`;
`chown -R www-data:www-data /var/www`;
`chown -R www-data:www-data /var/discourse`;
`systemctl restart apache2`;
`touch /etc/discourse.seeded`;
......
......@@ -347,7 +347,7 @@ Wants=network-online.target
[Service]
Type=oneshot
ExecStart=$service
TimeoutSec=0
TimeoutSec=600
RemainAfterExit=yes
[Install]
......
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