Run init.sh as created user and use script-relative compose files

This commit is contained in:
deadcxap
2025-08-25 03:41:31 +03:00
parent 1b35d951d9
commit 05325ce982
3 changed files with 12 additions and 6 deletions
+1 -1
View File
@@ -322,7 +322,7 @@ setup_role() {
run "Setting ownership for $target_dir" chown -R "$USERNAME:$USERNAME" "$target_dir"
init_script="$target_dir/init.sh"
if [[ -f "$init_script" ]]; then
run "Running init.sh for $service_name" bash "$init_script"
run "Running init.sh for $service_name" sudo -u "$USERNAME" -H bash "$init_script"
run "Waiting for $service_name stack to be Up" bash -c "
set -e
dir=\"$target_dir\"