summarylogtreecommitdiffstats
path: root/mastodon.install
diff options
context:
space:
mode:
authorJean Lucas2018-08-06 23:22:32 -0400
committerJean Lucas2018-08-06 23:27:07 -0400
commit955114a336431192b72f1cc57b3da752b0f8b7f6 (patch)
tree6a4b4493a44b117cd779f1f857aad9c44b6580a1 /mastodon.install
parentac69ea2e27f6acde3459745d0c94c5c73bf6f10c (diff)
downloadaur-955114a336431192b72f1cc57b3da752b0f8b7f6.tar.gz
Version bump to 2.4.3, routine cleanup
- Correct license - Remove optdepend of sudo since install file now instructs to run shell command as root - Remove install file from source array since it's not needed there - Quote pkgdir - Cleanup/reformat install file language
Diffstat (limited to 'mastodon.install')
-rw-r--r--mastodon.install16
1 files changed, 12 insertions, 4 deletions
diff --git a/mastodon.install b/mastodon.install
index 0014d119e2e1..edbad88f417b 100644
--- a/mastodon.install
+++ b/mastodon.install
@@ -3,15 +3,23 @@ post_install() {
useradd -rd /var/lib/mastodon mastodon
chown -R mastodon:mastodon /var/lib/mastodon
- echo "To setup Mastodon, enable and start PostgreSQL and Redis, create the Mastodon PostgreSQL user using 'sudo -u postgres createuser -d mastodon', run 'sudo su - mastodon', then 'RAILS_ENV=production bundle exec rails mastodon:setup'.
-Enable mastodon.target to have all Mastodon's required services start at boot."
+ echo "To setup Mastodon, enable and start PostgreSQL and Redis:
+# systemctl enable --now postgresql redis
+Create the Mastodon PostgreSQL user and grant it the ability to create databases with:
+# su - postgres -s /bin/sh -c \"createdb -d mastodon\"
+Then, run:
+# su - mastodon -s /bin/sh -c \"cd '/var/lib/mastodon'; RAILS_ENV=production bundle exec rails mastodon:setup\"
+Finally, enable and start all the required services:
+# systemctl enable --now mastodon.target"
}
post_upgrade() {
chown -R mastodon:mastodon /var/lib/mastodon
- echo "To upgrade the database schema, run 'sudo su - mastodon', then 'RAILS_ENV=production bundle exec rails db:migrate'.
-To pre-compile assets, run 'sudo su - mastodon', then 'RAILS_ENV=production bundle exec rails assets:precompile'."
+ echo "To upgrade the database schema, run:
+# su - mastodon -s /bin/sh -c \"RAILS_ENV=production bundle exec rails db:migrate\"
+To pre-compile assets, run:
+# su - mastodon -s /bin/sh -c \"RAILS_ENV=production bundle exec rails assets:precompile\""
}
post_remove() {