summarylogtreecommitdiffstats
path: root/wildfly.install
blob: ee3c0c7168224b9c853877c01a6756a8a1e73a43 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
post_install() {
	getent group wildfly >/dev/null 2>&1 || \
		groupadd -r wildfly
	getent passwd wildfly >/dev/null 2>&1 || \
		useradd -g wildfly -d /opt/wildfly -s /bin/bash -r wildfly
	chown -R wildfly:wildfly /opt/wildfly
	echo "  Wildfly is installed as a systemd service. You should run the add-user"
	echo "  script (/opt/wildfly/bin/add-user.sh) in order to add a management user"
	echo "  if you want to access the management console, which listens locally on"
	echo "  port 9990. The main server listens on all networks at port 8080."
}

post_upgrade() {
  post_install "$1"
}

pre_remove() {
	systemctl disable wildfly
	systemctl stop wildfly
	wait

	if getent passwd wildfly >/dev/null 2>&1; then
		userdel wildfly
	fi
	if getent group wildfly >/dev/null 2>&1; then
		groupdel wildfly
	fi
}