From 6238e80b08e7ac3984544a07461ef8dff82beffb Mon Sep 17 00:00:00 2001 From: KMY Date: Sun, 17 Sep 2023 12:12:48 +0900 Subject: [PATCH] Update setup script --- install/setup2.sh | 8 +++++++- install/setup3.sh | 4 +++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/install/setup2.sh b/install/setup2.sh index 88b1b82cce..f2504de26c 100644 --- a/install/setup2.sh +++ b/install/setup2.sh @@ -1,12 +1,18 @@ # gitで最新リリースを取得 cd ~/live -git checkout $(git tag -l | grep -E '^kb[0-9]' | grep -v 'rc[0-9]*$' | sort -V | tail -n 1) +# 最新タグを取り込む +if [ "$1" != "newest" ]; then + git checkout $(git tag -l | grep -E '^kb[0-9]' | grep -v 'rc[0-9]*$' | sort -V | tail -n 1) +fi + +# Rubyバージョン管理用のrbenvをインストール、初期設定 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 +# 続きのシェルスクリプトをgit管理外にコピーし権限を与える cp /home/mastodon/live/install/setup3.sh /home/mastodon/setup3.sh chmod +x /home/mastodon/setup3.sh cp /home/mastodon/live/install/setup4.sh /home/mastodon/setup4.sh diff --git a/install/setup3.sh b/install/setup3.sh index 8d90e2b562..03a4ef6f73 100644 --- a/install/setup3.sh +++ b/install/setup3.sh @@ -1,5 +1,7 @@ -# 必要なファイルをコピー +# これを設定しておかないと、Web表示時にNginxがPermission Errorを起こす chmod o+x /home/mastodon + +# 必要なファイルをコピー cp /home/mastodon/live/dist/nginx.conf /etc/nginx/sites-available/mastodon ln -s /etc/nginx/sites-available/mastodon /etc/nginx/sites-enabled/mastodon cp /home/mastodon/live/dist/mastodon-*.service /etc/systemd/system/