<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p><br>
    </p>
    <br>
    <div class="moz-cite-prefix">On 09/27/2016 03:52 PM, Aline Manera
      wrote:<br>
    </div>
    <blockquote
      cite="mid:b02a1e7d-57c8-a17d-9629-17b92a368f4b@linux.vnet.ibm.com"
      type="cite">
      <br>
      <br>
      On 09/26/2016 01:17 PM, Ramon Medeiros wrote:
      <br>
      <blockquote type="cite">
        <br>
        <br>
        On 09/22/2016 09:00 AM, Aline Manera wrote:
        <br>
        <blockquote type="cite">Hi Ramon,
          <br>
          <br>
          On 09/21/2016 02:58 PM, Ramon Medeiros wrote:
          <br>
          <blockquote type="cite">Create dir if not exist
            <br>
          </blockquote>
          <br>
          Is it the recommendation from nginx?
          <br>
          I mean, this directory should be installed by nginx and if it
          is not maybe there is a better directory (already installed by
          nginx) to place configuration files.
          <br>
          <br>
          Also, doing that, the system will keep the directory on
          package removal.
          <br>
        </blockquote>
        Nop,
        <br>
        <br>
        just remove the rpm and the file is still there
        <br>
      </blockquote>
      <br>
      And we don't want it, right?
      <br>
    </blockquote>
    Well, at Fedora 24, removing the package, the conf.d directory
    persists:<br>
    <br>
    ramonn@jarvis:~$ sudo rpm -e nginx<br>
    [sudo] password for ramonn: <br>
    ramonn@jarvis:~$ ls -l /etc/nginx/<br>
    conf.d/            default.d/         mime.types        
    mime.types.rpmnew  <br>
    ramonn@jarvis:~$ ls -l /etc/nginx/default.d/<br>
    total 0<br>
    ramonn@jarvis:~$ ls -l /etc/nginx/conf.d/<br>
    total 0<br>
    lrwxrwxrwx. 1 root root 44 Sep 28 10:37 wok.conf -&gt;
    /home/ramonn/GitTrees/WOK/src/nginx/wok.conf<br>
    <br>
    <blockquote
      cite="mid:b02a1e7d-57c8-a17d-9629-17b92a368f4b@linux.vnet.ibm.com"
      type="cite">
      <br>
      <blockquote type="cite">
        <blockquote type="cite">
          <br>
          <blockquote type="cite">
            <br>
            Signed-off-by: Ramon Medeiros
            <a class="moz-txt-link-rfc2396E" href="mailto:ramonn@linux.vnet.ibm.com">&lt;ramonn@linux.vnet.ibm.com&gt;</a>
            <br>
            ---
            <br>
              src/wok/proxy.py | 5 +++++
            <br>
              1 file changed, 5 insertions(+)
            <br>
            <br>
            diff --git a/src/wok/proxy.py b/src/wok/proxy.py
            <br>
            index b68b86e..4b06fc2 100644
            <br>
            --- a/src/wok/proxy.py
            <br>
            +++ b/src/wok/proxy.py
            <br>
            @@ -116,6 +116,11 @@ def _create_proxy_config(options):
            <br>
                  # SSL certifications.
            <br>
                  if not paths.installed:
            <br>
                      dst = os.path.join(paths.sys_nginx_conf_dir,
            "wok.conf")
            <br>
            +
            <br>
            +        # directoy does not exist: create it
            <br>
            +        if not os.path.exists(paths.sys_nginx_conf_dir):
            <br>
            +            os.makedirs(paths.sys_nginx_conf_dir)
            <br>
            +
            <br>
                      if os.path.isfile(dst) or os.path.islink(dst):
            <br>
                          os.remove(dst)
            <br>
                      os.symlink(os.path.join(nginx_config_dir,
            "wok.conf"), dst)
            <br>
          </blockquote>
          <br>
        </blockquote>
        <br>
      </blockquote>
      <br>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 

Ramon Nunes Medeiros
Kimchi Developer
Linux Technology Center Brazil
IBM Systems &amp; Technology Group
Phone : +55 19 2132 7878
<a class="moz-txt-link-abbreviated" href="mailto:ramonn@br.ibm.com">ramonn@br.ibm.com</a> </pre>
  </body>
</html>