Skip to content

Instantly share code, notes, and snippets.

@adililhan
Created September 26, 2023 20:48
Show Gist options
  • Select an option

  • Save adililhan/be7a8204c208a90756da31784ccf9168 to your computer and use it in GitHub Desktop.

Select an option

Save adililhan/be7a8204c208a90756da31784ccf9168 to your computer and use it in GitHub Desktop.

Revisions

  1. adililhan created this gist Sep 26, 2023.
    12 changes: 12 additions & 0 deletions signal-detect-v1.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    #!/bin/bash

    trap control_t SIGTERM

    function control_t() {
    echo "SIGTERM detected"
    }

    for i in `seq 1 86400`; do
    sleep 1
    date
    done