<html><head></head><body><div class="yahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><div><span>am trying this solution but it doesn't work<br><ol style="list-style-position: inside"><li><p>Create a new file <code>/etc/systemd/system/midpoint.service</code> with the following content:</p><div class="ydpfa876928code ydpfa876928panel ydpfa876928pdl ydpfa876928conf-macro ydpfa876928output-block" data-hasbody="true" data-macro-name="code" style="border-width: 1px;"><div class="ydpfa876928codeHeader ydpfa876928panelHeader ydpfa876928pdl" style="border-bottom-width: 1px;"><b>midpoint.service</b></div><div class="ydpfa876928codeContent ydpfa876928panelContent ydpfa876928pdl">
<div><div id="ydpfa876928highlighter_265381" class="ydpfa876928syntaxhighlighter ydpfa876928sh-confluence ydpfa876928nogutter ydpfa876928bash"><table class="yahoo-compose-table-card" cellspacing="0" cellpadding="0" border="1"><tbody><tr><td class="ydpfa876928code"><div class="ydpfa876928container" title="Hint: double-click to select code"><div class="ydpfa876928line ydpfa876928number1 ydpfa876928index0 ydpfa876928alt2"><code class="ydpfa876928bash ydpfa876928plain">[Unit]</code></div><div class="ydpfa876928line ydpfa876928number2 ydpfa876928index1 ydpfa876928alt1"><code class="ydpfa876928bash ydpfa876928plain">Description=MidPoint Standalone Service</code></div><div class="ydpfa876928line ydpfa876928number3 ydpfa876928index2 ydpfa876928alt2"><code class="ydpfa876928bash ydpfa876928comments">###Requires=postgresql.service</code></div><div class="ydpfa876928line ydpfa876928number4 ydpfa876928index3 ydpfa876928alt1"><code class="ydpfa876928bash ydpfa876928comments">###After=postgresql.service</code></div><div class="ydpfa876928line ydpfa876928number5 ydpfa876928index4 ydpfa876928alt2"><code class="ydpfa876928bash ydpfa876928plain">[Service]</code></div><div class="ydpfa876928line ydpfa876928number6 ydpfa876928index5 ydpfa876928alt1"><code class="ydpfa876928bash ydpfa876928plain">User=midpoint</code></div><div class="ydpfa876928line ydpfa876928number7 ydpfa876928index6 ydpfa876928alt2"><code class="ydpfa876928bash ydpfa876928plain">WorkingDirectory=</code><code class="ydpfa876928bash ydpfa876928plain">/opt/midpoint</code></div><div class="ydpfa876928line ydpfa876928number8 ydpfa876928index7 ydpfa876928alt1"><code class="ydpfa876928bash ydpfa876928plain">ExecStart=</code><code class="ydpfa876928bash ydpfa876928plain">/usr/bin/java</code> <code class="ydpfa876928bash ydpfa876928plain">-Xmx2048m -Dmidpoint.home=</code><code class="ydpfa876928bash ydpfa876928plain">/opt/midpoint/var</code> <code class="ydpfa876928bash ydpfa876928plain">-jar </code><code class="ydpfa876928bash ydpfa876928plain">/opt/midpoint/lib/midpoint</code><code class="ydpfa876928bash ydpfa876928plain">.war</code></div><div class="ydpfa876928line ydpfa876928number9 ydpfa876928index8 ydpfa876928alt2"><code class="ydpfa876928bash ydpfa876928plain">SuccessExitStatus=143</code></div><div class="ydpfa876928line ydpfa876928number10 ydpfa876928index9 ydpfa876928alt1"><code class="ydpfa876928bash ydpfa876928comments">###TimeoutStopSec=120s</code></div><div class="ydpfa876928line ydpfa876928number11 ydpfa876928index10 ydpfa876928alt2"><code class="ydpfa876928bash ydpfa876928plain">[Install]</code></div><div class="ydpfa876928line ydpfa876928number12 ydpfa876928index11 ydpfa876928alt1"><code class="ydpfa876928bash ydpfa876928plain">WantedBy=multi-user.target</code></div></div></td></tr></tbody></table></div></div>
</div></div></li><li><p>Run the following commands to enable midpoint service:</p><div class="ydpfa876928code ydpfa876928panel ydpfa876928pdl ydpfa876928conf-macro ydpfa876928output-block" data-hasbody="true" data-macro-name="code" style="border-width: 1px;"><div class="ydpfa876928codeContent ydpfa876928panelContent ydpfa876928pdl">
<div><div id="ydpfa876928highlighter_136032" class="ydpfa876928syntaxhighlighter ydpfa876928sh-confluence ydpfa876928nogutter ydpfa876928bash"><table class="yahoo-compose-table-card" cellspacing="0" cellpadding="0" border="1"><tbody><tr><td class="ydpfa876928code"><div class="ydpfa876928container" title="Hint: double-click to select code"><div class="ydpfa876928line ydpfa876928number1 ydpfa876928index0 ydpfa876928alt2"><code class="ydpfa876928bash ydpfa876928functions">sudo</code> <code class="ydpfa876928bash ydpfa876928plain">systemctl daemon-reload</code></div><div class="ydpfa876928line ydpfa876928number2 ydpfa876928index1 ydpfa876928alt1"><code class="ydpfa876928bash ydpfa876928functions">sudo</code> <code class="ydpfa876928bash ydpfa876928plain">systemctl </code><code class="ydpfa876928bash ydpfa876928functions">enable</code> <code class="ydpfa876928bash ydpfa876928plain">midpoint</code></div></div></td></tr></tbody></table></div></div>
</div></div></li><li><p>Start midPoint as systemd service using the following command:</p><div class="ydpfa876928code ydpfa876928panel ydpfa876928pdl ydpfa876928conf-macro ydpfa876928output-block" data-hasbody="true" data-macro-name="code" style="border-width: 1px;"><div class="ydpfa876928codeContent ydpfa876928panelContent ydpfa876928pdl">
<div><div id="ydpfa876928highlighter_861974" class="ydpfa876928syntaxhighlighter ydpfa876928sh-confluence ydpfa876928nogutter ydpfa876928bash"><table class="yahoo-compose-table-card" cellspacing="0" cellpadding="0" border="1"><tbody><tr><td class="ydpfa876928code"><div class="ydpfa876928container" title="Hint: double-click to select code"><div class="ydpfa876928line ydpfa876928number1 ydpfa876928index0 ydpfa876928alt2"><code class="ydpfa876928bash ydpfa876928functions">sudo</code> <code class="ydpfa876928bash ydpfa876928plain">systemctl start midpoint</code></div></div></td></tr></tbody></table></div></div>
</div></div></li><li>You can monitor the startup in <code>/opt/midpoint/var/log/midpoint.log</code> (standard midPoint log) or in <code>/var/log/syslog</code> (the file name may vary; if systemd is used, <code>/opt/midpoint/var/log/midpoint.out</code> is <strong>not</strong> used.</li><li><p>You can stop midPoint as systemd service using the following command:</p><div class="ydpfa876928code ydpfa876928panel ydpfa876928pdl ydpfa876928conf-macro ydpfa876928output-block" data-hasbody="true" data-macro-name="code" style="border-width: 1px;"><div class="ydpfa876928codeContent ydpfa876928panelContent ydpfa876928pdl">
<div><div id="ydpfa876928highlighter_145887" class="ydpfa876928syntaxhighlighter ydpfa876928sh-confluence ydpfa876928nogutter ydpfa876928bash"><table class="yahoo-compose-table-card" cellspacing="0" cellpadding="0" border="1"><tbody><tr><td class="ydpfa876928code"><div class="ydpfa876928container" title="Hint: double-click to select code"><div class="ydpfa876928line ydpfa876928number1 ydpfa876928index0 ydpfa876928alt2"><code class="ydpfa876928bash ydpfa876928functions">sudo</code> <code class="ydpfa876928bash ydpfa876928plain">systemctl stop midpoint</code></div></div></td></tr></tbody></table></div></div>
</div></div></li><li><p>To disable automatic midPoint startup/shutdown, use the following command:</p><div class="ydpfa876928code ydpfa876928panel ydpfa876928pdl ydpfa876928conf-macro ydpfa876928output-block" data-hasbody="true" data-macro-name="code" style="border-width: 1px;"><div class="ydpfa876928codeContent ydpfa876928panelContent ydpfa876928pdl">
<div><div id="ydpfa876928highlighter_508432" class="ydpfa876928syntaxhighlighter ydpfa876928sh-confluence ydpfa876928nogutter ydpfa876928bash"><table class="yahoo-compose-table-card" cellspacing="0" cellpadding="0" border="1"><tbody><tr><td class="ydpfa876928code"><div class="ydpfa876928container" title="Hint: double-click to select code"><div class="ydpfa876928line ydpfa876928number1 ydpfa876928index0 ydpfa876928alt2"><code class="ydpfa876928bash ydpfa876928functions">sudo</code> <code class="ydpfa876928bash ydpfa876928plain">systemctl disable midpoint</code></div></div></td></tr></tbody></table></div></div></div></div></li></ol></span><br></div></div></body></html>