mirror of
https://github.com/falk-werner/webfuse
synced 2025-06-13 12:54:15 +00:00
19 lines
219 B
Bash
Executable File
19 lines
219 B
Bash
Executable File
#!/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 "$@"
|