This commit is contained in:
2025-08-16 01:54:30 +00:00
parent 0958ef8440
commit bb0cd7a496
2 changed files with 28 additions and 11 deletions

View File

@@ -54,9 +54,26 @@ nomad_exec_bash SERVICE:
nomad_exec_sh SERVICE:
ID=$(nomad status {{SERVICE}} | grep "running" | grep "{{SERVICE}}" | head -n 1| awk '{print $1}'); nomad alloc exec -task {{SERVICE}} -t ${ID} /bin/sh
nomad_log SERVICE TASK:
ID=$(nomad status {{SERVICE}} | grep "running" | grep "{{SERVICE}}" | head -n 1| awk '{print $1}'); nomad alloc logs -task {{TASK}} ${ID}
run_nicotine:
mullvad connect
-nix-shell -p nicotine-plus --command nicotine-plus
mullvad disconnect
# Define your hosts here
HOSTS := "odroid6 odroid7 odroid8 opti1"
# Run a command on all predefined hosts
ssh_all COMMAND:
@for host in {{HOSTS}}; do echo "=== Running on $host ==="; ssh "$host" '{{COMMAND}}'; echo ""; done
# Run a command on a specific host
ssh_host HOST COMMAND:
@ssh "{{HOST}}" '{{COMMAND}}'
# Show the list of predefined hosts
ssh_list_hosts:
@echo "Predefined hosts:"
@echo "{{HOSTS}}" | tr ' ' '\n' | sed 's/^/ - /'