<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none"><!-- p { margin-top: 0px; margin-bottom: 0px; }--></style>
</head>
<body dir="ltr" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>​I think JC has it in his rhel 7 rpms from Terabithia.<br>
</p>
<p><br>
</p>
<p>=G=<br>
</p>
<div style="color: rgb(33, 33, 33);">
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Xymon <xymon-bounces@xymon.com> on behalf of Josh Luthman <josh@imaginenetworksllc.com><br>
<b>Sent:</b> Tuesday, September 20, 2016 7:02 PM<br>
<b>To:</b> Enzo Arroyo<br>
<b>Cc:</b> xymon@xymon.com<br>
<b>Subject:</b> Re: [Xymon] create systemctl init script xymon client</font>
<div> </div>
</div>
<div>
<p dir="ltr">There's a package floating around that takes care of everything and includes the sys ctl scripts.</p>
<p dir="ltr">Josh Luthman<br>
Office: 937-552-2340<br>
Direct: 937-552-2343<br>
1100 Wayne St<br>
Suite 1337<br>
Troy, OH 45373</p>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Sep 20, 2016 6:51 PM, "Enzo Arroyo" <<a href="mailto:enzo@arroyof.com">enzo@arroyof.com</a>> wrote:<br type="attribution">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
<div style="word-wrap:break-word">Hello,
<div><br>
</div>
<div>Please can somebody help me?, I need to create a init script in centos 7, I’m installed from sources, my path is:</div>
<div><br>
</div>
<div>
<div style="margin:0px; font-size:11px; font-family:Menlo">/home/xymon/client/runclient.<wbr>sh</div>
</div>
<div style="margin:0px; font-size:11px; font-family:Menlo"><br>
</div>
<div style="margin:0px; font-size:11px; font-family:Menlo">I create a systemctl script with this (/etc/systemd/system/xymond.<wbr>service):</div>
<div style="margin:0px; font-size:11px; font-family:Menlo"><br>
</div>
<div style="margin:0px; font-size:11px; font-family:Menlo">
<div>------------------------------<wbr>------------------------------<wbr>------------------------------<wbr>----</div>
<div></div>
</div>
<div style="margin:0px; font-size:11px; font-family:Menlo">
<div style="margin:0px"># xymond.service</div>
<div style="margin:0px"># systemd file for Fedora 18 and up, or RHEL 7 and up</div>
<div style="margin:0px; min-height:13px"><br>
</div>
<div style="margin:0px">[Unit]</div>
<div style="margin:0px">Description=Xymon is the service for monitoring system</div>
<div style="margin:0px">Documentation=man:xymon(7) man:xymonlaunch(8) man:xymon(1)</div>
<div style="margin:0px">After=network.target</div>
<div style="margin:0px; min-height:13px"><br>
</div>
<div style="margin:0px">[Install]</div>
<div style="margin:0px"># Compatibility with "xymon" and "xymon-client"</div>
<div style="margin:0px">#Alias=xymond.service</div>
<div style="margin:0px">WantedBy=multi-user.target</div>
<div style="margin:0px; min-height:13px"><br>
</div>
<div style="margin:0px">[Service]</div>
<div style="margin:0px">#EnvironmentFile=/etc/<wbr>sysconfig/xymonlaunch</div>
<div style="margin:0px">User=xymon</div>
<div style="margin:0px"># We wrap in xymoncmd to eliminate the need for the bulk of the old init script</div>
<div style="margin:0px">ExecStart=/home/xymon/client/<wbr>runclient.sh</div>
<div style="margin:0px">#ExecStop=/home/xymon/client/<wbr>runclient.sh stop</div>
<div style="margin:0px">Type=simple</div>
<div style="margin:0px; min-height:13px"><br>
</div>
<div style="margin:0px"># Kill xymonlaunch, but don't send kills to the underlying procs, since they</div>
<div style="margin:0px"># might be doing important things (like writing checkpoints and flushing caches)</div>
<div style="margin:0px">KillMode=process</div>
<div style="margin:0px"># SendSIGHUP=yes</div>
<div style="margin:0px">SendSIGKILL=no</div>
<div>
<div>------------------------------<wbr>------------------------------<wbr>------------------------------<wbr>----</div>
<div></div>
</div>
<div><br>
</div>
<div>But not start:</div>
<div><br>
</div>
<div>------------------------------<wbr>------------------------------<wbr>------------------------------<wbr>----</div>
<div></div>
<div>xymond.service - Xymon is the service that work with the Corpresa monitoring system</div>
<div>
<div style="margin:0px">   Loaded: loaded (/etc/systemd/system/xymond.<wbr>service; enabled; vendor preset: disabled)</div>
<div style="margin:0px">   Active: inactive (dead) since mar 2016-09-20 17:15:39 EDT; 1min 3s ago</div>
<div style="margin:0px">     Docs: man:xymon(7)</div>
<div style="margin:0px">           man:xymonlaunch(8)</div>
<div style="margin:0px">           man:xymon(1)</div>
<div style="margin:0px">  Process: 12573 ExecStart=/home/xymon/client/<wbr>runclient.sh (code=exited, status=0/SUCCESS)</div>
<div style="margin:0px"> Main PID: 12573 (code=exited, status=0/SUCCESS)</div>
<div style="margin:0px">   CGroup: /system.slice/xymond.service</div>
<div style="margin:0px">           ├─12410 sh -c vmstat 300 2 1>/home/xymon/client/tmp/<wbr>xymon_vmstat.live-<a href="http://sync.arroyof.com" target="_blank">sync.<wbr>arroyof.com</a>.12374 2>&1; mv /home/xymon/client/tmp/xymon_<wbr>vmstat.live-<a href="http://sync.arroyof.com" target="_blank">sync.arroyof.com</a>.<wbr>12374
 /home/xymon/client/tmp/xymon_<wbr>vmstat.live-sync....</div>
<div style="margin:0px">           ├─12412 vmstat 300 2</div>
<div style="margin:0px">           ├─12502 sh -c vmstat 300 2 1>/home/xymon/client/tmp/<wbr>xymon_vmstat.live-<a href="http://sync.arroyof.com" target="_blank">sync.<wbr>arroyof.com</a>.12470 2>&1; mv /home/xymon/client/tmp/xymon_<wbr>vmstat.live-<a href="http://sync.arroyof.com" target="_blank">sync.arroyof.com</a>.<wbr>12470
 /home/xymon/client/tmp/xymon_<wbr>vmstat.live-sync....</div>
<div style="margin:0px">           └─12504 vmstat 300 2</div>
</div>
<div style="margin:0px">
<div>——————————————————————————————<wbr>—————————————————</div>
<div><br>
</div>
<div>Thank you, best regards</div>
<div><br>
</div>
<div></div>
</div>
</div>
</div>
<br>
______________________________<wbr>_________________<br>
Xymon mailing list<br>
<a href="mailto:Xymon@xymon.com">Xymon@xymon.com</a><br>
<a href="http://lists.xymon.com/mailman/listinfo/xymon" rel="noreferrer" target="_blank">http://lists.xymon.com/<wbr>mailman/listinfo/xymon</a><br>
<br>
</blockquote>
</div>
</div>
</div>
</div>
</body>
</html>