Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Create a new file /etc/systemd/system/midpoint.service with the following content:

    Code Block
    languagebash
    titlemidpoint.service
    [Unit]
    Description=MidPoint Standalone Service
    ###Requires=postgresql.service
    ###After=postgresql.service
    [Service]
    User=midpoint
    WorkingDirectory=/opt/midpoint
    ExecStart=/usr/bin/java -Xmx2048m -Dmidpoint.home=/opt/midpoint/var -jar /opt/midpoint/lib/midpoint.war
    SuccessExitStatus=143
    ###TimeoutStopSec=120s
    [Install]
    WantedBy=multi-user.target
  2. Run the following commands to enable midpoint service:

    Code Block
    languagebash
    sudo systemctl daemon-reload
    sudo systemctl enable midpoint
  3. Start midPoint as systemd service using the following command:

    Code Block
    languagebash
    sudo systemctl start midpoint
  4. You can monitor the startup in /opt/midpoint/var/log/midpoint.log (standard midPoint log) or in /var/log/syslog (the file name may vary; if systemd is used, /opt/midpoint/var/log/midpoint.out is not used.
  5. You can stop midPoint as systemd service using the following command:

    Code Block
    languagebash
    sudo systemctl stop midpoint
  6. To disable automatic midPoint startup/shutdown, use the following command:

    Code Block
    languagebash
    sudo systemctl disable midpoint

...