Skip to content

Commit

Permalink
[WFCORE-6935] Correct naming for systemd, unit, file
Browse files Browse the repository at this point in the history
  • Loading branch information
yersan committed Oct 21, 2024
1 parent 0c23d70 commit 6d567a1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
= How to configure WildFly as a Systemd service
= How to configure WildFly as a systemd service

The following steps describe the process to configure WildFly as a Systemd service.
You can use the provided wildfly-[standalone,domain].service file as a template for your own Systemd Unit File.
The following steps describe the process to configure WildFly as a systemd service.
You can use the provided wildfly-[standalone,domain].service file as a template for your own systemd unit file.
It can be adjusted to your needs, for example, you can manually change the user that runs the service,
the location of the WildFly installation, logs, etc.
Alternatively, you can use the generate_systemd_unit.sh script to automatically generate a new Systemd Unit File
Alternatively, you can use the generate_systemd_unit.sh script to automatically generate a new systemd unit file
using this server installation as the WildFly home.

If you want to install WildFly as a Systemd service from scratch as a Systemd service, follow the steps below.
If you want to install WildFly as a systemd service from scratch as a systemd service, follow the steps below.

== Install WildFly and initialize the WILDFLY_HOME variable

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh

# This script is just a helper to generate the Systemd Unit Files for WildFly
# This script is just a helper to generate the systemd unit files for WildFly
# assuming that the server home will be the one that hold this script file.
# It also allows to specify the user and group that will run the server.

Expand All @@ -19,7 +19,7 @@ SYSTEMD_FILE="${SCRIPT_DIR}/wildfly-${JBOSS_SYSTEMD_MODE}.service"
JBOSS_SYSTEMD_USER="${2:-wildfly}"
JBOSS_SYSTEMD_GROUP="${3:-wildfly}"

echo "INFO: Systemd Unit File to generate: ${SYSTEMD_FILE}"
echo "INFO: systemd unit file to generate: ${SYSTEMD_FILE}"
echo "INFO: Using JBOSS_HOME: ${JBOSS_HOME}"
echo "INFO: User: ${JBOSS_SYSTEMD_USER}"
echo "INFO: Group: ${JBOSS_SYSTEMD_GROUP}"
Expand All @@ -41,10 +41,10 @@ sed -e "s|@@@JBOSS_SYSTEMD_SERVER_HOME@@@|${JBOSS_HOME}|g" \
systemd-analyze verify --recursive-errors=no "${SYSTEMD_FILE}"

echo ""
echo "INFO: Systemd Unit File generated."
echo "INFO: systemd unit file generated."
echo "INFO: The ${JBOSS_SYSTEMD_USER}:${JBOSS_SYSTEMD_GROUP} are the user:group configured to launch the server. You have to ensure this user and group exist and have the necessary permissions to read and launch the server."
echo "INFO: Use ${JBOSS_HOME}/bin/systemd/wildfly-${JBOSS_SYSTEMD_MODE}.conf to configure the server environment."
echo "INFO: After configuring your environment, to install the server as a Systemd service do the following:"
echo "INFO: After configuring your environment, to install the server as a systemd service do the following:"
echo ""
echo "sudo cp ${SYSTEMD_FILE} $(pkg-config systemd --variable=systemdsystemunitdir)"
echo "sudo cp ${JBOSS_HOME}/bin/systemd/wildfly-${JBOSS_SYSTEMD_MODE}.conf /etc/sysconfig/wildfly-${JBOSS_SYSTEMD_MODE}.conf"
Expand Down

0 comments on commit 6d567a1

Please sign in to comment.