[Kimchi-devel] [PATCH][Wok] Issue #166: wok is pointing to /etc/nginx/conf.d which does not exists on OpenSuse 42.1

Ramon Medeiros ramonn at linux.vnet.ibm.com
Wed Sep 28 13:43:02 UTC 2016



On 09/27/2016 03:52 PM, Aline Manera wrote:
>
>
> On 09/26/2016 01:17 PM, Ramon Medeiros wrote:
>>
>>
>> On 09/22/2016 09:00 AM, Aline Manera wrote:
>>> Hi Ramon,
>>>
>>> On 09/21/2016 02:58 PM, Ramon Medeiros wrote:
>>>> Create dir if not exist
>>>
>>> Is it the recommendation from nginx?
>>> 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.
>>>
>>> Also, doing that, the system will keep the directory on package 
>>> removal.
>> Nop,
>>
>> just remove the rpm and the file is still there
>
> And we don't want it, right?
Well, at Fedora 24, removing the package, the conf.d directory persists:

ramonn at jarvis:~$ sudo rpm -e nginx
[sudo] password for ramonn:
ramonn at jarvis:~$ ls -l /etc/nginx/
conf.d/            default.d/         mime.types mime.types.rpmnew
ramonn at jarvis:~$ ls -l /etc/nginx/default.d/
total 0
ramonn at jarvis:~$ ls -l /etc/nginx/conf.d/
total 0
lrwxrwxrwx. 1 root root 44 Sep 28 10:37 wok.conf -> 
/home/ramonn/GitTrees/WOK/src/nginx/wok.conf

>
>>>
>>>>
>>>> Signed-off-by: Ramon Medeiros <ramonn at linux.vnet.ibm.com>
>>>> ---
>>>>   src/wok/proxy.py | 5 +++++
>>>>   1 file changed, 5 insertions(+)
>>>>
>>>> diff --git a/src/wok/proxy.py b/src/wok/proxy.py
>>>> index b68b86e..4b06fc2 100644
>>>> --- a/src/wok/proxy.py
>>>> +++ b/src/wok/proxy.py
>>>> @@ -116,6 +116,11 @@ def _create_proxy_config(options):
>>>>       # SSL certifications.
>>>>       if not paths.installed:
>>>>           dst = os.path.join(paths.sys_nginx_conf_dir, "wok.conf")
>>>> +
>>>> +        # directoy does not exist: create it
>>>> +        if not os.path.exists(paths.sys_nginx_conf_dir):
>>>> +            os.makedirs(paths.sys_nginx_conf_dir)
>>>> +
>>>>           if os.path.isfile(dst) or os.path.islink(dst):
>>>>               os.remove(dst)
>>>>           os.symlink(os.path.join(nginx_config_dir, "wok.conf"), dst)
>>>
>>
>

-- 

Ramon Nunes Medeiros
Kimchi Developer
Linux Technology Center Brazil
IBM Systems & Technology Group
Phone : +55 19 2132 7878
ramonn at br.ibm.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ovirt.org/pipermail/kimchi-devel/attachments/20160928/e1c27c21/attachment.html>


More information about the Kimchi-devel mailing list