handle SIGINT
This commit is contained in:
parent
9f7f634933
commit
197a9c5708
1 changed files with 5 additions and 1 deletions
|
@ -1,5 +1,6 @@
|
||||||
#!/bin/env bash
|
#!/bin/env bash
|
||||||
|
|
||||||
|
conf=~/.etherswitch
|
||||||
switch_state=0
|
switch_state=0
|
||||||
|
|
||||||
function check_fn {
|
function check_fn {
|
||||||
|
@ -9,7 +10,10 @@ function check_fn {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
source ~/.etherswitch
|
source $conf
|
||||||
|
|
||||||
|
# handle SIGTERM
|
||||||
|
trap 'exit' 15
|
||||||
|
|
||||||
if [ -z "$device" ]
|
if [ -z "$device" ]
|
||||||
then
|
then
|
||||||
|
|
Loading…
Reference in a new issue