Avoid failing install if sessions directory exists
authorSimo Sorce <simo@redhat.com>
Thu, 1 May 2014 19:31:25 +0000 (15:31 -0400)
committerSimo Sorce <simo@redhat.com>
Fri, 2 May 2014 00:52:24 +0000 (20:52 -0400)
Signed-off-by: Simo Sorce <simo@redhat.com>
ipsilon/install/ipsilon-server-install

index dd30c9a..b5a6371 100755 (executable)
@@ -101,7 +101,9 @@ def install(plugins, args):
                               confopts)
     if not os.path.exists(args['httpd_conf']):
         os.symlink(idp_conf, args['httpd_conf'])
                               confopts)
     if not os.path.exists(args['httpd_conf']):
         os.symlink(idp_conf, args['httpd_conf'])
-    os.makedirs(os.path.join(args['data_dir'], 'sessions'), 0700)
+    sessdir = os.path.join(args['data_dir'], 'sessions')
+    if not os.path.exists(sessdir):
+        os.makedirs(sessdir, 0700)
     data_conf = os.path.join(args['data_dir'], 'ipsilon.conf')
     if not os.path.exists(data_conf):
         os.symlink(ipsilon_conf, data_conf)
     data_conf = os.path.join(args['data_dir'], 'ipsilon.conf')
     if not os.path.exists(data_conf):
         os.symlink(ipsilon_conf, data_conf)