Fix permission issue

This commit is contained in:
Manuel Thalmann 2024-12-06 13:51:08 +01:00
parent f3ff0cb0db
commit 569204babe
7 changed files with 7 additions and 7 deletions

View file

@ -82,7 +82,7 @@ begin
"ssh -p $port -o StrictHostKeyChecking=no git@127.0.0.1 \"SSH_ORIGINAL_COMMAND=\\\"$SSH_ORIGINAL_COMMAND\\\" \$0 \$@\"" "ssh -p $port -o StrictHostKeyChecking=no git@127.0.0.1 \"SSH_ORIGINAL_COMMAND=\\\"$SSH_ORIGINAL_COMMAND\\\" \$0 \$@\""
end | sudo tee "$bin" >/dev/null end | sudo tee "$bin" >/dev/null
chmod +x "$bin" sudo chmod +x "$bin"
end end
function getServiceServers -V server function getServiceServers -V server

View file

@ -68,7 +68,7 @@ begin
for dir in "$root"/data/{downloads,config/{,jellyfin,flood,radarr,sonarr,lidarr,prowlarr},media/{,movies,series,music}} for dir in "$root"/data/{downloads,config/{,jellyfin,flood,radarr,sonarr,lidarr,prowlarr},media/{,movies,series,music}}
sudo mkdir -p "$dir" sudo mkdir -p "$dir"
and chown -R $uid:$gid "$dir" and sudo chown -R $uid:$gid "$dir"
end end
rm "$file" rm "$file"

View file

@ -11,7 +11,7 @@ begin
set -l tsEnv "$(getServiceKey "$service").environment" set -l tsEnv "$(getServiceKey "$service").environment"
set -l dbEnv "$(getServiceKey db).environment" set -l dbEnv "$(getServiceKey db).environment"
initializeServiceInstallation $argv initializeServiceInstallation $argv
cp "$dir/docker-compose.base.yml" (getServiceRoot $argv) sudo cp "$dir/docker-compose.base.yml" (getServiceRoot $argv)
USER="$service" begin USER="$service" begin
yq "$tsEnv.TS3SERVER_DB_USER = env(USER)" "$source" | yq "$tsEnv.TS3SERVER_DB_USER = env(USER)" "$source" |

View file

@ -6,7 +6,7 @@ begin
function installSW -V dir function installSW -V dir
set -l root (getServiceRoot $argv) set -l root (getServiceRoot $argv)
initializeServiceInstallation $argv initializeServiceInstallation $argv
cp -rf "$dir"/docker-compose{.base,.overrides}.yml "$root" sudo cp -rf "$dir"/docker-compose{.base,.overrides}.yml "$root"
installDockerService $argv installDockerService $argv
end end

View file

@ -10,7 +10,7 @@ begin
set -l sqlPW (nix-shell -p keepassxc --run "keepassxc-cli generate --length 32") set -l sqlPW (nix-shell -p keepassxc --run "keepassxc-cli generate --length 32")
initializeServiceInstallation $argv initializeServiceInstallation $argv
cp -rf "$dir"/{.dockerignore,docker-compose{.base,.overrides,.core{,.overrides}}.yml,parser.patch,tmforever-entrypoint.sh,trackmania.Dockerfile,xaseco-entrypoint.sh,xaseco.Dockerfile} "$root" sudo cp -rf "$dir"/{.dockerignore,docker-compose{.base,.overrides,.core{,.overrides}}.yml,parser.patch,tmforever-entrypoint.sh,trackmania.Dockerfile,xaseco-entrypoint.sh,xaseco.Dockerfile} "$root"
PW="$tmPW" yq "$(getServiceKey "tm").environment.TM_SUPERADMIN_PASSWORD = env(PW)" "$source" | PW="$tmPW" yq "$(getServiceKey "tm").environment.TM_SUPERADMIN_PASSWORD = env(PW)" "$source" |
PW="$sqlPW" yq "$(getServiceKey "db").environment.MYSQL_PASSWORD = env(PW)" | PW="$sqlPW" yq "$(getServiceKey "db").environment.MYSQL_PASSWORD = env(PW)" |

View file

@ -12,7 +12,7 @@ begin
set -l dbKey "$envKey.DATABASE_URL" set -l dbKey "$envKey.DATABASE_URL"
set -l dbUrl (yq "$dbKey" "$source" | sed "s/^\(.*:\/\/.*:\).*\(@.*\/.*\)\$/\1$pw\2/") set -l dbUrl (yq "$dbKey" "$source" | sed "s/^\(.*:\/\/.*:\).*\(@.*\/.*\)\$/\1$pw\2/")
initializeServiceInstallation $argv initializeServiceInstallation $argv
cp "$dir/docker-compose.base.yml" (getServiceRoot $argv) sudo cp "$dir/docker-compose.base.yml" (getServiceRoot $argv)
URL="https://$domain.$(getMachineFQDN)" yq "$envKey.DOMAIN = env(URL)" "$source" | URL="https://$domain.$(getMachineFQDN)" yq "$envKey.DOMAIN = env(URL)" "$source" |
ADDRESS="no-reply@$(getMachineFQDN)" yq "$envKey.SMTP_FROM = env(ADDRESS)" | ADDRESS="no-reply@$(getMachineFQDN)" yq "$envKey.SMTP_FROM = env(ADDRESS)" |

View file

@ -20,7 +20,7 @@ begin
echo "{}" | sudo tee "$config" >/dev/null echo "{}" | sudo tee "$config" >/dev/null
echo "{}" | sudo tee "$overrides" >/dev/null echo "{}" | sudo tee "$overrides" >/dev/null
cp "$dir/.dockerignore" "$root" sudo cp "$dir/.dockerignore" "$root"
sudo touch "$root"/{agent,ci}.common.env sudo touch "$root"/{agent,ci}.common.env
for i in (seq 1 3 (count $environments)) for i in (seq 1 3 (count $environments))