From 65575e7f11c6591bbd528f41b906e2bca11cf3b3 Mon Sep 17 00:00:00 2001 From: tamaina Date: Wed, 7 Dec 2022 03:48:09 +0900 Subject: [PATCH] 1.6.4 --- CHANGELOG.md | 3 +++ README.en.md | 2 +- README.md | 2 +- ubuntu.sh | 2 +- update.ubuntu.sh | 14 +++++++------- 5 files changed, 13 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9417467..16cfffc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## v1.6.3 +update.ubuntu.shでユーザーの切り替えに失敗するのを修正(sudo -uの代わりにsudo -iuを使うように) + ## v1.6.3 arm64でdocker buildできない問題を修正 diff --git a/README.en.md b/README.en.md index 5d3d5a7..122b735 100644 --- a/README.en.md +++ b/README.en.md @@ -1,4 +1,4 @@ -# Misskey install shell script v1.6.3 +# Misskey install shell script v1.6.4 Install Misskey with one shell script! You can install misskey on an Ubuntu server just by answering some questions. diff --git a/README.md b/README.md index 5826559..319254c 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Misskey install shell script v1.6.3 +# Misskey install shell script v1.6.4 Misskeyを簡単にインストールするためのシェルスクリプトができました! いくつかの質問に答えるだけで、UbuntuサーバーへMisskey(v12)を簡単にインストールできます! diff --git a/ubuntu.sh b/ubuntu.sh index 2430daf..dfec34e 100644 --- a/ubuntu.sh +++ b/ubuntu.sh @@ -18,7 +18,7 @@ # DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -version="1.6.3"; +version="1.6.4"; tput setaf 4; echo ""; diff --git a/update.ubuntu.sh b/update.ubuntu.sh index a27ba0c..f70b431 100644 --- a/update.ubuntu.sh +++ b/update.ubuntu.sh @@ -18,7 +18,7 @@ # DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -version="1.6.3"; +version="1.6.4"; tput setaf 2; echo "Check: root user;"; @@ -128,7 +128,7 @@ fi #endregion else m_uid=$(id -u "$misskey_user"); - oldid=$(sudo -u "$misskey_user" XDG_RUNTIME_DIR=/run/user/$m_uid DOCKER_HOST=unix:///run/user/$m_uid/docker.sock docker images --no-trunc --format "{{.ID}}" $docker_repository); + oldid=$(sudo -iu "$misskey_user" XDG_RUNTIME_DIR=/run/user/$m_uid DOCKER_HOST=unix:///run/user/$m_uid/docker.sock docker images --no-trunc --format "{{.ID}}" $docker_repository); if [ $method == "docker" ]; then tput setaf 3; @@ -140,7 +140,7 @@ else docker_repository="local/misskey:latest"; fi - sudo -u "$misskey_user" XDG_RUNTIME_DIR=/run/user/$m_uid DOCKER_HOST=unix:///run/user/$m_uid/docker.sock docker build -t $docker_repository "/home/$misskey_user/$misskey_directory"; + sudo -iu "$misskey_user" XDG_RUNTIME_DIR=/run/user/$m_uid DOCKER_HOST=unix:///run/user/$m_uid/docker.sock docker build -t $docker_repository "/home/$misskey_user/$misskey_directory"; else tput setaf 3; @@ -152,18 +152,18 @@ else docker_repository="misskey/misskey:latest"; fi - sudo -u "$misskey_user" XDG_RUNTIME_DIR=/run/user/$m_uid DOCKER_HOST=unix:///run/user/$m_uid/docker.sock docker pull "$docker_repository"; + sudo -iu "$misskey_user" XDG_RUNTIME_DIR=/run/user/$m_uid DOCKER_HOST=unix:///run/user/$m_uid/docker.sock docker pull "$docker_repository"; fi tput setaf 3; echo "Process: docker rm container;"; tput setaf 7; - sudo -u "$misskey_user" XDG_RUNTIME_DIR=/run/user/$m_uid DOCKER_HOST=unix:///run/user/$m_uid/docker.sock docker rm -f "$docker_container"; + sudo -iu "$misskey_user" XDG_RUNTIME_DIR=/run/user/$m_uid DOCKER_HOST=unix:///run/user/$m_uid/docker.sock docker rm -f "$docker_container"; tput setaf 3; echo "Process: docker run;"; tput setaf 7; - docker_container=$(sudo -u "$misskey_user" XDG_RUNTIME_DIR=/run/user/$m_uid DOCKER_HOST=unix:///run/user/$m_uid/docker.sock docker run -d -p $misskey_port:$misskey_port --add-host=$misskey_localhost:$docker_host_ip -v /home/$misskey_user/$misskey_directory/files:/misskey/files -v "/home/$misskey_user/$misskey_directory/.config/default.yml":/misskey/.config/default.yml:ro --restart unless-stopped -t "$docker_repository"); + docker_container=$(sudo -iu "$misskey_user" XDG_RUNTIME_DIR=/run/user/$m_uid DOCKER_HOST=unix:///run/user/$m_uid/docker.sock docker run -d -p $misskey_port:$misskey_port --add-host=$misskey_localhost:$docker_host_ip -v /home/$misskey_user/$misskey_directory/files:/misskey/files -v "/home/$misskey_user/$misskey_directory/.config/default.yml":/misskey/.config/default.yml:ro --restart unless-stopped -t "$docker_repository"); su "$misskey_user" <<-MKEOF set -eu; @@ -189,5 +189,5 @@ else tput setaf 3; echo "Process: docker remove image;"; tput setaf 7; - sudo -u $misskey_user XDG_RUNTIME_DIR=/run/user/$m_uid DOCKER_HOST=unix:///run/user/$m_uid/docker.sock docker rmi "$oldid" + sudo -iu $misskey_user XDG_RUNTIME_DIR=/run/user/$m_uid DOCKER_HOST=unix:///run/user/$m_uid/docker.sock docker rmi "$oldid" fi