Skip to content

Commit

Permalink
1.6.4
Browse files Browse the repository at this point in the history
  • Loading branch information
tamaina authored Dec 6, 2022
1 parent d8d817b commit 65575e7
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 10 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## v1.6.3
update.ubuntu.shでユーザーの切り替えに失敗するのを修正(sudo -uの代わりにsudo -iuを使うように)

## v1.6.3
arm64でdocker buildできない問題を修正

Expand Down
2 changes: 1 addition & 1 deletion README.en.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Misskey install shell script v1.6.3
# Misskey install shell script v1.6.4
Misskeyを簡単にインストールするためのシェルスクリプトができました!

いくつかの質問に答えるだけで、UbuntuサーバーへMisskey(v12)を簡単にインストールできます!
Expand Down
2 changes: 1 addition & 1 deletion ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 "";
Expand Down
14 changes: 7 additions & 7 deletions update.ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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;";
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -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

0 comments on commit 65575e7

Please sign in to comment.