12345678910111213141516 |
- #!/bin/sh
- pid_list="$(ps aux | grep ipfcst-upload | grep -v grep | awk '{print $2}')"
- pid_count=$(echo $pid_list | wc -w)
- if test $pid_count -eq 1; then
- echo "upload running, pid is $pid_list"
- exit 0
- elif test $pid_count -gt 1; then
- echo "Multiple upload running $pid_list"
- exit 1
- elif test -z $pid_list; then
- echo "upload is not running"
- exit 1
- fi
- exit 0
|