Skip to content

Commit

Permalink
dont fail in script
Browse files Browse the repository at this point in the history
  • Loading branch information
ludamad committed Apr 13, 2024
1 parent 706313f commit 058abf0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,7 @@ class UserData {
// - github actions job starts and ends always bump +ec2InstanceTtl minutes
// - when the amount of started jobs (start_run_* files) equal the amount of finished jobs (end_run_* files), we shutdown in 5 minutes
`echo "${bumpShutdown}; touch /run/shutdown-refcount/start_run_\\$(date +%s)_\\$RANDOM" > /run/delay_shutdown.sh`,
`echo "[ \\$(find /run/shutdown-refcount/ -name 'start_run_*' | wc -l) -eq \\$(find /run/shutdown-refcount/ -name 'end_run_*' | wc -l) ] && shutdown -P 5" > /run/if_refcount0_shutdown.sh`,
`echo "[ \\$(find /run/shutdown-refcount/ -name 'start_run_*' | wc -l) -eq \\$(find /run/shutdown-refcount/ -name 'end_run_*' | wc -l) ] && shutdown -P 5 ; true" > /run/if_refcount0_shutdown.sh`,
`echo "${bumpShutdown}; touch /run/shutdown-refcount/end_run_\\$(date +%s)_\\$RANDOM ; /run/if_refcount0_shutdown.sh " > /run/refcount_and_delay_shutdown.sh`,
"chmod +x /run/delay_shutdown.sh",
"chmod +x /run/refcount_and_delay_shutdown.sh",
Expand Down
2 changes: 1 addition & 1 deletion src/ec2/userdata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export class UserData {
// - github actions job starts and ends always bump +ec2InstanceTtl minutes
// - when the amount of started jobs (start_run_* files) equal the amount of finished jobs (end_run_* files), we shutdown in 5 minutes
`echo "${bumpShutdown}; touch /run/shutdown-refcount/start_run_\\$(date +%s)_\\$RANDOM" > /run/delay_shutdown.sh`,
`echo "[ \\$(find /run/shutdown-refcount/ -name 'start_run_*' | wc -l) -eq \\$(find /run/shutdown-refcount/ -name 'end_run_*' | wc -l) ] && shutdown -P 5" > /run/if_refcount0_shutdown.sh`,
`echo "[ \\$(find /run/shutdown-refcount/ -name 'start_run_*' | wc -l) -eq \\$(find /run/shutdown-refcount/ -name 'end_run_*' | wc -l) ] && shutdown -P 5 ; true" > /run/if_refcount0_shutdown.sh`,
`echo "${bumpShutdown}; touch /run/shutdown-refcount/end_run_\\$(date +%s)_\\$RANDOM ; /run/if_refcount0_shutdown.sh " > /run/refcount_and_delay_shutdown.sh`,
"chmod +x /run/delay_shutdown.sh",
"chmod +x /run/refcount_and_delay_shutdown.sh",
Expand Down

0 comments on commit 058abf0

Please sign in to comment.