Lines 15-21
Link Here
|
15 |
[ -d "/proc/${PID}" ] || return 1 |
15 |
[ -d "/proc/${PID}" ] || return 1 |
16 |
EXE="$(readlink -f /proc/${PID}/exe)" |
16 |
EXE="$(readlink -f /proc/${PID}/exe)" |
17 |
EXE="${EXE% (deleted)}" # in case asterisk got upgraded and we're still looking at an old one. |
17 |
EXE="${EXE% (deleted)}" # in case asterisk got upgraded and we're still looking at an old one. |
18 |
[ "${EXE}" = /usr/sbin/asterisk ] || return 1 # pid got re-used for another process. |
18 |
[ "${EXE}" = /usr/bin/asterisk ] || [ "${EXE}" = /usr/sbin/asterisk ] || return 1 # pid got re-used for another process. |
19 |
|
19 |
|
20 |
# PID reported in pidfile is active, and is still an asterisk instance. |
20 |
# PID reported in pidfile is active, and is still an asterisk instance. |
21 |
return 0 |
21 |
return 0 |