diff options
author | Caleb Maclennan | 2017-04-21 20:04:41 +0300 |
---|---|---|
committer | Caleb Maclennan | 2017-04-21 20:06:16 +0300 |
commit | 8b95ca292f0cbe1debe332540a66f97e94c67053 (patch) | |
tree | dd43af440501015ef6eac0d5c253e292c2412048 | |
parent | 5631570032b59addbe237f731743c906ef5574c5 (diff) | |
download | aur-8b95ca292f0cbe1debe332540a66f97e94c67053.tar.gz |
Work on installing and setting up config file
-rw-r--r-- | .SRCINFO | 5 | ||||
-rw-r--r-- | PKGBUILD | 12 |
2 files changed, 14 insertions, 3 deletions
@@ -1,9 +1,9 @@ # Generated by mksrcinfo v8 -# Fri Apr 21 13:53:04 UTC 2017 +# Fri Apr 21 17:04:11 UTC 2017 pkgbase = mastodon-git pkgdesc = A GNU Social-compatible microblogging server pkgver = 1.2.2_22_ga0ed88a9 - pkgrel = 0.1 + pkgrel = 0.2 url = https://mastodon.social install = mastodon.install arch = i686 @@ -24,6 +24,7 @@ pkgbase = mastodon-git conflicts = mastodon conflicts = mastodon-docker conflicts = mastodon-docker-git + backup = etc/mastodon/env.production source = git://github.com/tootsuite/mastodon.git#branch=master source = mastodon-web.service source = mastodon-sidekiq.service @@ -3,7 +3,7 @@ pkgname=mastodon-git pkgver=1.2.2_22_ga0ed88a9 _branch=master -pkgrel=0.1 +pkgrel=0.2 pkgdesc="A GNU Social-compatible microblogging server" arch=('i686' 'x86_64') url="https://mastodon.social" @@ -32,6 +32,7 @@ source=( "mastodon-streaming.service" "mastodon.target" ) +backup=("etc/mastodon/env.production") sha256sums=('SKIP' '2b3a22149ee88c4bacf83aa1958b06fc791057089737596b35b6e1968b1443aa' '5f72e3ee2921f8b760bac614d910a3c36334ebfefdfd4ba0c9058e21d8537c73' @@ -58,6 +59,13 @@ build() { } post_install() { + sed -i -e "/^PAPERCLIP_SECRET=\$/s/\$/$(rake secret)/" \ + -e "/^SECRET_KEY_BASE=\$/s/\$/$(rake secret)/" \ + -e "/^OTP_SECRET=\$/s/\$/$(rake secret)/" \ + -e "/^REDIS_HOST=redis\$/s/redis\$/localhost/" \ + -e "/^DB_HOST=db\$/s/redis\$/localhost/" \ + /etc/mastodon/env.production + echo "1. Configure your instance:" echo " $ vim /etc/mastodon/env.production" echo "" @@ -81,6 +89,8 @@ post_upgrade() { package() { cd "${pkgname%-git}" + install -Dm 644 .env.production.sample ${pkgdir}/etc/mastodon/env.production + for service in mastodon-{web,sidekiq,streaming}.service mastodon.target; do install -Dm644 "${srcdir}/${service}" "${pkgdir}/usr/lib/systemd/system/${service}" done |