mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-25 00:51:21 +00:00
Improve the status command of the rc script:
- return error code if not running [1] - narrow down which java process to accept as "running" PR: 193728 [1] Noticed by: jason.unovitch@gmail.com [1]
This commit is contained in:
parent
d7ce2c000e
commit
afe4280587
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=371092
@ -3,7 +3,7 @@
|
||||
|
||||
PORTNAME= serviio
|
||||
PORTVERSION= 1.4.1.2
|
||||
PORTREVISION= 1
|
||||
PORTREVISION= 2
|
||||
CATEGORIES= net multimedia java www
|
||||
MASTER_SITES= http://download.serviio.org/releases/
|
||||
EXTRACT_SUFX= -linux.tar.gz
|
||||
|
@ -32,11 +32,12 @@ stop_cmd="$command -stop"
|
||||
|
||||
status_cmd=${name}_status
|
||||
serviio_status() {
|
||||
serviio_pid=$(ps -aU ${serviio_user} | awk '/java/ {print $1}')
|
||||
serviio_pid=$(ps -wwwaU ${serviio_user} | awk '/java.*org.serviio.MediaServer/ {print $1}')
|
||||
if [ -n "${serviio_pid}" ]; then
|
||||
echo "${name} is running as pid ${serviio_pid}"
|
||||
else
|
||||
echo "${name} is not running"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user