Created attachment 147420 [details] patch adding exit codes to the serviio rc script status function Serviio's rc script currently always exits with a 0 from the echo lines in its status function. This confuses service monitoring daemons as it looks like Serviio is actually running. A patch that has explicit exit codes is attached that should improve the behavior with anything that expects a 0 as meaning the service is working. ##### BEFORE root@test-serviio:/usr/local/etc/rc.d # service serviio onestatus serviio is not running root@test-serviio:/usr/local/etc/rc.d # echo $? 0 root@test-serviio:/usr/local/etc/rc.d # service serviio onestatus serviio is running as pid 40239 root@test-serviio:/usr/local/etc/rc.d # echo $? 0 ##### AFTER root@test-serviio:/usr/local/etc/rc.d # service serviio onestatus serviio is running as pid 40743 root@test-serviio:/usr/local/etc/rc.d # echo $? 0 root@test-serviio:/usr/local/etc/rc.d # service serviio onestatus serviio is not running root@test-serviio:/usr/local/etc/rc.d # echo $? 1
Auto-assigned to maintainer netchild@FreeBSD.org
A commit references this bug: Author: netchild Date: Sat Oct 18 06:28:40 UTC 2014 New revision: 371092 URL: https://svnweb.freebsd.org/changeset/ports/371092 Log: 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] Changes: head/net/serviio/Makefile head/net/serviio/files/serviio.in
Something similar (closer to what is used in rc.subr) is committed now.