Derive WEBROOT_USER from WEBROOT, remove from env

This commit is contained in:
2026-06-13 21:03:43 +02:00
parent ef8c0e1a32
commit 766b7edcdd
3 changed files with 3 additions and 3 deletions
-1
View File
@@ -1,6 +1,5 @@
SERVER=user@example.com SERVER=user@example.com
WEBROOT=/home/example.com/public_html WEBROOT=/home/example.com/public_html
WEBROOT_USER=example.com
USER_REPO=https://gitea.example.com/user/natascha-rieter.nl-user.git USER_REPO=https://gitea.example.com/user/natascha-rieter.nl-user.git
GITEA_HOST=gitea.example.com GITEA_HOST=gitea.example.com
+1 -1
View File
@@ -22,7 +22,7 @@ content-pull:
# Remote # Remote
remote-install: remote-install:
ssh $(SERVER) "WEBROOT=$(WEBROOT) WEBROOT_USER=$(WEBROOT_USER) USER_REPO=$(USER_REPO) GITEA_HOST=$(GITEA_HOST) GITEA_USER=$(GITEA_USER) GITEA_TOKEN=$(GITEA_TOKEN) bash -s" < scripts/server-install.sh ssh $(SERVER) "WEBROOT=$(WEBROOT) USER_REPO=$(USER_REPO) GITEA_HOST=$(GITEA_HOST) GITEA_USER=$(GITEA_USER) GITEA_TOKEN=$(GITEA_TOKEN) bash -s" < scripts/server-install.sh
remote-install-plugins: remote-install-plugins:
ssh $(SERVER) "cd $(WEBROOT) && php bin/gpm install $(shell cat plugins.txt | tr '\n' ' ') -y" ssh $(SERVER) "cd $(WEBROOT) && php bin/gpm install $(shell cat plugins.txt | tr '\n' ' ') -y"
+2 -1
View File
@@ -2,8 +2,9 @@
set -e set -e
: "${WEBROOT:?WEBROOT is not set}" : "${WEBROOT:?WEBROOT is not set}"
: "${WEBROOT_USER:?WEBROOT_USER is not set}"
: "${USER_REPO:?USER_REPO is not set}" : "${USER_REPO:?USER_REPO is not set}"
WEBROOT_USER=$(echo "$WEBROOT" | cut -d'/' -f3)
: "${GITEA_HOST:?GITEA_HOST is not set}" : "${GITEA_HOST:?GITEA_HOST is not set}"
: "${GITEA_USER:?GITEA_USER is not set}" : "${GITEA_USER:?GITEA_USER is not set}"
: "${GITEA_TOKEN:?GITEA_TOKEN is not set}" : "${GITEA_TOKEN:?GITEA_TOKEN is not set}"