<div dir="ltr">John,<div><br></div><div>This is what I ended up with that works.. I&#39;ve been busy and haven&#39;t been able to get all the stuff in place to put in a pull request :-/  This still requires you to link binaries to /usr/bin from wherever you compile your Freeswitch to.. </div><div><br></div><div><div>[Unit]</div><div>Description=freeswitch</div><div>After=syslog.target network.target local-fs.target</div><div><br></div><div>[Service]</div><div>; service</div><div>Type=forking</div><div>RuntimeDirectory=freeswitch</div><div>PIDFile=/run/freeswitch/freeswitch.pid</div><div>PermissionsStartOnly=true</div><div>ExecStart=/usr/bin/freeswitch -ncwait -nonat -run /run/freeswitch</div><div>TimeoutSec=45s</div><div>Restart=always</div><div>; exec</div><div>WorkingDirectory=/run/freeswitch</div><div>User=freeswitch</div><div>Group=daemon</div><div>LimitCORE=infinity</div><div>LimitNOFILE=100000</div><div>LimitNPROC=60000</div><div>;LimitSTACK=240</div><div>LimitRTPRIO=infinity</div><div>LimitRTTIME=7000000</div><div>IOSchedulingClass=realtime</div><div>IOSchedulingPriority=2</div><div>CPUSchedulingPolicy=rr</div><div>CPUSchedulingPriority=89</div><div>UMask=0007</div><div><br></div><div>[Install]</div><div>WantedBy=multi-user.target</div></div><div><br></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><div align="left"><font face="Arial">Cheers,</font></div><div align="left"><font face="Arial"><br></font></div><div align="left"><font face="Arial">Joe</font></div><div align="left"><font face="Arial"><br></font></div></div></div></div><div class="gmail_quote">On Tue, May 12, 2015 at 2:17 PM, tilt <span dir="ltr">&lt;<a href="mailto:tilt@temp3r.com" target="_blank">tilt@temp3r.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    Hi Joseph, Any chance you can share your service file, I am having
    issues myself trying to get freeswitch running with systemd.<br>
    <br>
    Thank You,<br>
    -John<div><div class="h5"><br>
    <br>
    <div>On 05/01/2015 11:07 AM, Joseph Dickson
      wrote:<br>
    </div>
    <blockquote type="cite">
      <div dir="ltr">I&#39;ve got one that works now after discovering that
        RuntimeDirectory= will create a directory for you under /run.. 
        I&#39;ll try to get you the pull request next week<br>
        <div class="gmail_extra"><br>
          <div class="gmail_quote">On Fri, May 1, 2015 at 1:56 PM,
            Michael Jerris <span dir="ltr">&lt;<a href="mailto:mike@jerris.com" target="_blank">mike@jerris.com</a>&gt;</span> wrote:<br>
            <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
              <div style="word-wrap:break-word">If you have a working
                one, please get a pull request to us so we can review
                the changes.
                <div><br>
                </div>
                <div>Thanks</div>
                <div>Mike</div>
                <div>
                  <div>
                    <div><br>
                      <div>
                        <blockquote type="cite">
                          <div>On May 1, 2015, at 1:40 PM, Vik Killa
                            &lt;<a href="mailto:vipkilla@gmail.com" target="_blank">vipkilla@gmail.com</a>&gt;
                            wrote:</div>
                          <br>
                          <div>
                            <div dir="ltr">Hello,
                              <div>I modified the path variables in the
                                systemd init file. </div>
                              <div>My file looks like this:<br>
                                <br>
                                <div>;;;;; Author: Travis Cross &lt;<a href="mailto:tc@traviscross.com" target="_blank">tc@traviscross.com</a>&gt;</div>
                                <div><br>
                                </div>
                                <div>[Unit]</div>
                                <div>Description=freeswitch</div>
                                <div>After=syslog.target network.target
                                  local-fs.target</div>
                                <div><br>
                                </div>
                                <div>[Service]</div>
                                <div>; service</div>
                                <div>Type=forking</div>
                                <div>PIDFile=/usr/local/freeswitch/run/freeswitch.pid</div>
                                <div>PermissionsStartOnly=true</div>
                                <div>ExecStartPre=/bin/mkdir -p
                                  /usr/local/freeswitch/run</div>
                                <div>ExecStartPre=/bin/chown
                                  freeswitch:freeswitch
                                  /usr/local/freeswitch/run</div>
                                <div>ExecStart=/usr/bin/freeswitch
                                  -ncwait -nonat</div>
                                <div>TimeoutSec=45s</div>
                                <div>Restart=always</div>
                                <div>; exec</div>
                                <div>WorkingDirectory=/usr/local/freeswitch/run</div>
                                <div>User=freeswitch</div>
                                <div>Group=freeswitch</div>
                                <div>LimitCORE=infinity</div>
                                <div>LimitNOFILE=100000</div>
                                <div>LimitNPROC=60000</div>
                                <div>;LimitSTACK=240</div>
                                <div>LimitRTPRIO=infinity</div>
                                <div>LimitRTTIME=7000000</div>
                                <div>IOSchedulingClass=realtime</div>
                                <div>IOSchedulingPriority=2</div>
                                <div>CPUSchedulingPolicy=rr</div>
                                <div>CPUSchedulingPriority=89</div>
                                <div>UMask=0007</div>
                                <div><br>
                                </div>
                                <div>[Install]</div>
                                <div>WantedBy=multi-user.target</div>
                                <div><br>
                                </div>
                              </div>
                            </div>
                            <div class="gmail_extra"><br>
                              <div class="gmail_quote">On Fri, May 1,
                                2015 at 12:50 PM, Joseph Dickson <span dir="ltr">&lt;<a href="mailto:jdickson@evolvetsi.com" target="_blank">jdickson@evolvetsi.com</a>&gt;</span>
                                wrote:<br>
                                <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                                  <div dir="ltr">Happy Friday!
                                    <div><br>
                                    </div>
                                    <div>I&#39;m having trouble using latest
                                      release systemd unit file on
                                      Debian Jessie..  It looks like the
                                      unit file is the same in master,
                                      so I imagine the issue exists
                                      there too..</div>
                                    <div><br>
                                    </div>
                                    <div>On my system (fresh Debian 8
                                      install), I get the following
                                      failure when trying to start using
                                      the included unit file:<br>
                                    </div>
                                    <div><br>
                                    </div>
                                    <div>
                                      <div>May 01 12:48:22 XXX
                                        systemd[9119]: Failed at step
                                        CHDIR spawning /bin/mkdir: No
                                        such file or directory</div>
                                      <div><br>
                                      </div>
                                      <div>
                                        <div>I&#39;m new to systemd, but it
                                          looks like the problem is that
                                          the WorkingDirectory is set to
                                          /run/freeswitch.  Trouble is
                                          that /run/freeswitch is
                                          created in an ExecStartPre
                                          statement.  That&#39;s the best
                                          explanation I have for the
                                          CHDIR failure that systemd is
                                          complaining about.</div>
                                        <div><br>
                                        </div>
                                        <div>It looks like the only way
                                          to get /run/freeswitch created
                                          soon enough to be used as a
                                          WorkingDirectory is the
                                          tmpfiles.d mechanism that
                                          systemd has.  Am I on the
                                          right track, or am I missing
                                          an obvious solution?</div>
                                        <div><br>
                                        </div>
                                        <div>Thanks!</div>
                                        <span><font color="#888888">
                                            <div><br>
                                            </div>
                                          </font></span></div>
                                      <span><font color="#888888">
                                          <div>
                                            <div>
                                              <div dir="ltr">
                                                <div align="left"><font face="Arial">Joseph
                                                    Dickson</font></div>
                                                <div align="left"><font face="Arial"><a href="mailto:jdickson@evolvetsi.com" target="_blank">jdickson@evolvetsi.com</a></font></div>
                                                <div align="left"><font face="Arial"><br>
                                                  </font></div>
                                              </div>
                                            </div>
                                          </div>
                                        </font></span></div>
                                  </div>
                                  <br>
_________________________________________________________________________<br>
                                  Professional FreeSWITCH Consulting
                                  Services:<br>
                                  <a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
                                  <a href="http://www.freeswitchsolutions.com/" target="_blank">http://www.freeswitchsolutions.com</a><br>
                                  <br>
                                  Official FreeSWITCH Sites<br>
                                  <a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org</a><br>
                                  <a href="http://confluence.freeswitch.org/" target="_blank">http://confluence.freeswitch.org</a><br>
                                  <a href="http://www.cluecon.com/" target="_blank">http://www.cluecon.com</a><br>
                                  <br>
                                  FreeSWITCH-users mailing list<br>
                                  <a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
                                  <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
                                  UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
                                  <a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org</a><br>
                                </blockquote>
                              </div>
                              <br>
                            </div>
_________________________________________________________________________<br>
                            Professional FreeSWITCH Consulting Services:
                            <br>
                            <a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
                            <a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
                            <br>
                            Official FreeSWITCH Sites<br>
                            <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
                            <a href="http://confluence.freeswitch.org" target="_blank">http://confluence.freeswitch.org</a><br>
                            <a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
                            <br>
                            FreeSWITCH-users mailing list<br>
                            <a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
                            <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
                            UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
                            <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a></div>
                        </blockquote>
                      </div>
                      <br>
                    </div>
                  </div>
                </div>
              </div>
              <br>
_________________________________________________________________________<br>
              Professional FreeSWITCH Consulting Services:<br>
              <a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
              <a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
              <br>
              Official FreeSWITCH Sites<br>
              <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
              <a href="http://confluence.freeswitch.org" target="_blank">http://confluence.freeswitch.org</a><br>
              <a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
              <br>
              FreeSWITCH-users mailing list<br>
              <a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
              <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
              UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
              <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
            </blockquote>
          </div>
          <br>
        </div>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
      <pre>_________________________________________________________________________
Professional FreeSWITCH Consulting Services: 
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a>

Official FreeSWITCH Sites
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a>
<a href="http://confluence.freeswitch.org" target="_blank">http://confluence.freeswitch.org</a>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a>

FreeSWITCH-users mailing list
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a></pre>
    </blockquote>
    <br>
  </div></div></div>

<br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" target="_blank">http://confluence.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br></blockquote></div><br></div></div>