Compare commits
2 commits
6e050499c9
...
f44d0a4a73
Author | SHA1 | Date | |
---|---|---|---|
f44d0a4a73 | |||
6fb855d385 |
8 changed files with 8 additions and 7 deletions
|
@ -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
|
||||||
|
|
|
@ -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"
|
||||||
|
|
|
@ -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" |
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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)" |
|
||||||
|
|
|
@ -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)" |
|
||||||
|
|
|
@ -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))
|
||||||
|
|
|
@ -74,6 +74,7 @@ function runSetupUserAction -V dir
|
||||||
end >"$sudoConfig"
|
end >"$sudoConfig"
|
||||||
|
|
||||||
and sudo --preserve-env --set-home --user "$name" env "PATH=$PATH" $cmdline
|
and sudo --preserve-env --set-home --user "$name" env "PATH=$PATH" $cmdline
|
||||||
|
or read -P "An error occurred! Press enter to continue: "
|
||||||
disposeAction
|
disposeAction
|
||||||
rm "$sudoConfig"
|
rm "$sudoConfig"
|
||||||
userdel -rf "$name"
|
userdel -rf "$name"
|
||||||
|
|
Loading…
Reference in a new issue