Bug 220513 - java/wildfly10: status and stop function in the init script do not work properly
Summary: java/wildfly10: status and stop function in the init script do not work properly
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Many People
Assignee: Jimmy Olgeni
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-07-06 13:37 UTC by soumar
Modified: 2017-10-25 23:01 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (yerenkow)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description soumar 2017-07-06 13:37:27 UTC
Hi,

status and stop function in the init script do now work properly. The status function is not even called.

I installed wildfly10 as a package and the fix is to add 2 lines into the init script:

I addedd the 2 lines in /usr/local/etc/rc.d/wildfly10 on lines 40, 41 and 83, 84:

1) for status:
start_cmd="wildfly10_start"
stop_cmd="wildfly10_stop"
pidfile="/var/run/wildfly10.pid"
# added for status to work:
status_cmd="wildfly10_status"

2) stop function does not remove pid file:

		# Let's blindly kill them all, since we are really know what we are doing.
		if [ ! -z "${wildfly10_additional_killall}" ]
		then
			sleep ${wildfly10_sleep}
			killall ${wildfly10_additional_killall}
		fi
	# added to remove pidfile:
	rm ${pidfile}
	fi
}


# uname -a
FreeBSD abc123 11.0-RELEASE-p9 FreeBSD 11.0-RELEASE-p9 #0: Tue Apr 11 08:48:40 UTC 2017     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64


br,
soumar
Comment 1 commit-hook freebsd_committer freebsd_triage 2017-10-25 23:00:24 UTC
A commit references this bug:

Author: olgeni
Date: Wed Oct 25 22:59:29 UTC 2017
New revision: 452897
URL: https://svnweb.freebsd.org/changeset/ports/452897

Log:
  java/wildfly10: add support for status command and remove pidfile on shutdown.

  While I'm here, fix whitespace, and add APP_SHORTNAME to the console
  output to make it clear who is doing what.

  PR:		220513
  Submitted by:	soumar@linux.fjfi.cvut.cz
  Approved by:	maintainer timeout

Changes:
  head/java/wildfly10/Makefile
  head/java/wildfly10/files/wildfly10.in