mirror of
https://github.com/NikitaIvanovV/ctpv.git
synced 2024-12-01 00:43:08 +01:00
Fallback if $fifo is empty
This commit is contained in:
parent
e23690151c
commit
ba00ea1435
@ -9,12 +9,8 @@ fifo_open() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
setup_fifo() {
|
setup_fifo() {
|
||||||
if [ -z "$fifo" ]; then
|
|
||||||
echo_err '$fifo is empty!'
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
exit_code="${1:-127}"
|
exit_code="${1:-127}"
|
||||||
|
[ -n "$fifo" ] || exit "$exit_code"
|
||||||
[ -e "$fifo" ] || exit "$exit_code"
|
[ -e "$fifo" ] || exit "$exit_code"
|
||||||
fifo_open "$fifo" || exit "$exit_code"
|
fifo_open "$fifo" || exit "$exit_code"
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user