mirror of
https://github.com/falk-werner/webfuse-provider
synced 2024-10-27 20:44:10 +00:00
19 lines
219 B
Bash
19 lines
219 B
Bash
|
#!/bin/sh
|
||
|
|
||
|
set -e
|
||
|
|
||
|
running_in_background() {
|
||
|
pid="$1"
|
||
|
|
||
|
case "$("$PS" -o stat= -p "$pid" 2>/dev/null || echo '+')" in
|
||
|
*+*) ;;
|
||
|
*) return 0 ;;
|
||
|
esac
|
||
|
|
||
|
return 1
|
||
|
}
|
||
|
|
||
|
PS="${PS:-ps}"
|
||
|
|
||
|
running_in_background "$@"
|