Start of Mastodon script, added Wordpress to ReadME

This commit is contained in:
Sophia Atkinson 2022-10-30 15:04:32 -07:00
parent 8f82bb22bd
commit 04b094743d
2 changed files with 69 additions and 0 deletions

View File

@ -59,4 +59,13 @@
### `wget -O gogsinstall.sh https://sop.wtf/sh/gogsinstall && bash gogsinstall.sh`
### ✔️ Uninstall
### `wget -O gogsuninstall.sh https://sop.wtf/sh/gogsuninstall && bash gogsuninstall.sh`
---
## Wordpress
###
### ✔️ Install
### `wget -O wpinstall.sh https://sop.wtf/wpinstall && bash wpinstall.sh`
---

60
scripts/masto.sh Normal file
View File

@ -0,0 +1,60 @@
#!/bin/bash
while true
do
read -r -p "Would you like to install Mastodon? [Y/n] " input
case $input in
[yY][eE][sS]|[yY])
break
;;
[nN][oO]|[nN])
break
;;
*)
echo "That wasn't an option..."
;;
esac
done
curl -sL https://deb.nodesource.com/setup_16.x | bash -
apt-get install nodejs -y
curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
apt-get update -y
apt-get install yarn -y
apt-get install postgresql postgresql-contrib -y
su - postgres
psql
CREATE USER mastodon CREATEDB;
exit
adduser --disabled-login --gecos 'Mastodon Server' mastodon
su - mastodon
git clone https://github.com/rbenv/rbenv.git ~/.rbenv
cd ~/.rbenv && src/configure && make -C src
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
exec bash
git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build\
RUBY_CONFIGURE_OPTS=--with-jemalloc rbenv install 3.0.3
rbenv global 3.0.3
gem update --system
gem install bundler --no-document
su - mastodon
git clone https://github.com/tootsuite/mastodon.git ~/live
cd ~/live
bundle config deployment 'true'
bundle config without 'development test'
bundle install -j$(getconf _NPROCESSORS_ONLN)
yarn install --pure-lockfile
RAILS_ENV=production bundle exec rake mastodon:setup
exit
cp /home/mastodon/live/dist/mastodon-web.service /etc/systemd/system/
cp /home/mastodon/live/dist/mastodon-sidekiq.service /etc/systemd/system/
cp /home/mastodon/live/dist/mastodon-streaming.service /etc/systemd/system/
systemctl start mastodon-web
systemctl start mastodon-sidekiq
systemctl start mastodon-streaming
systemctl enable mastodon-web
systemctl enable mastodon-sidekiq
systemctl enable mastodon-streaming
systemctl status mastodon-web mastodon-sidekiq mastodon-streaming