Skip to content

Instantly share code, notes, and snippets.

@ikbear
Last active April 18, 2021 10:00
Show Gist options
  • Select an option

  • Save ikbear/56b28f5ecaed76ebb0ca to your computer and use it in GitHub Desktop.

Select an option

Save ikbear/56b28f5ecaed76ebb0ca to your computer and use it in GitHub Desktop.

Revisions

  1. ikbear revised this gist Oct 21, 2015. 1 changed file with 4 additions and 4 deletions.
    8 changes: 4 additions & 4 deletions idle.sh
    Original file line number Diff line number Diff line change
    @@ -5,14 +5,14 @@ echo "Please replace this script."

    cleanup ()
    {
    kill -s SIGTERM $!
    exit 0
    kill -s SIGTERM $!
    exit 0
    }

    trap cleanup SIGINT SIGTERM

    while [ 1 ]
    do
    sleep 60 &
    wait $!
    sleep 60 &
    wait $!
    done
  2. ikbear created this gist Oct 21, 2015.
    18 changes: 18 additions & 0 deletions idle.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,18 @@
    #!/bin/bash

    echo "This is a idle script (infinite loop) to keep container running."
    echo "Please replace this script."

    cleanup ()
    {
    kill -s SIGTERM $!
    exit 0
    }

    trap cleanup SIGINT SIGTERM

    while [ 1 ]
    do
    sleep 60 &
    wait $!
    done