From 04b094743d58dd0487ad34433cb08260e484f7b0 Mon Sep 17 00:00:00 2001 From: Sophia Date: Sun, 30 Oct 2022 15:04:32 -0700 Subject: [PATCH] Start of Mastodon script, added Wordpress to ReadME --- README.md | 9 ++++++++ scripts/masto.sh | 60 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 69 insertions(+) create mode 100644 scripts/masto.sh diff --git a/README.md b/README.md index 5ce5602..566671d 100644 --- a/README.md +++ b/README.md @@ -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` + +--- + diff --git a/scripts/masto.sh b/scripts/masto.sh new file mode 100644 index 0000000..fcce914 --- /dev/null +++ b/scripts/masto.sh @@ -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 \ No newline at end of file