From 015923acd86237b4b8f3336473215e5dd66869f9 Mon Sep 17 00:00:00 2001 From: lsy Date: Tue, 15 Oct 2024 16:58:34 +0800 Subject: [PATCH] =?UTF-8?q?gitea=E9=85=8D=E7=BD=AE=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D,nginx=E8=B0=83=E7=94=A8=E8=AF=81=E4=B9=A6?= =?UTF-8?q?=E5=8F=AF=E8=83=BD=E6=B2=A1=E6=9C=89=E5=AE=89=E8=A3=85acme?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Config/Docker/Installs/gitea.sh | 4 ++-- Config/Web/nginx/install.sh | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Config/Docker/Installs/gitea.sh b/Config/Docker/Installs/gitea.sh index 0f8d14d..79ee5e0 100644 --- a/Config/Docker/Installs/gitea.sh +++ b/Config/Docker/Installs/gitea.sh @@ -11,6 +11,8 @@ declare port=$2 sudo useradd -m git sudo -u git ssh-keygen -t rsa -b 4096 -C "Gitea Host Key" -f /home/git/.ssh/id_rsa -N "" sudo -u git sh -c 'cat /home/git/.ssh/id_rsa.pub >> /home/git/.ssh/authorized_keys' +sudo -u git sh -c 'chmod a+x /usr/local/bin/gitea' +sudo -u git sh -c 'echo "ssh -p '$(( port+22 ))' -o StrictHostKeyChecking=no git@127.0.0.1 \"SSH_ORIGINAL_COMMAND=\\\"\$SSH_ORIGINAL_COMMAND\\\" \$0 \$@\"" > /usr/local/bin/gitea' declare uid=$( id git | awk -F'[=() ]+' '{print $2}' ) declare gid=$( id git | awk -F'[=() ]+' '{print $5}' ) @@ -60,5 +62,3 @@ EOF chown -R git:git $path sudo docker compose up -d -sudo -u git ssh -p $(( port+22 )) -o StrictHostKeyChecking=no git@127.0.0.1 "SSH_ORIGINAL_COMMAND=\"$SSH_ORIGINAL_COMMAND\" $0 $@" - diff --git a/Config/Web/nginx/install.sh b/Config/Web/nginx/install.sh index 3ca2c46..82cacbf 100644 --- a/Config/Web/nginx/install.sh +++ b/Config/Web/nginx/install.sh @@ -24,6 +24,7 @@ if [[ $pick == 2 ]]; then else echo "1.nginx(默认)" read -p "请选择:" pick + bash "$(dirname $(dirname $0))/acme/test.sh" bash "$(dirname $(dirname $0))/acme/apply.sh" "nginx" "${domain}" ssl_certificate="${HOME}/.acme.sh/${ssl_domain}_ecc/fullchain.cer" ssl_certificate_key="${HOME}/.acme.sh/${ssl_domain}_ecc/${ssl_domain}.key"