summaryrefslogtreecommitdiffstats
path: root/base/common
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2013-11-27 11:53:57 -0500
committerEndi S. Dewata <edewata@redhat.com>2013-12-16 19:15:42 -0500
commit5952a82975063c4ec27303091a44e586d1386933 (patch)
tree45e85faf77b727e608062eba7ff32b512286d0f8 /base/common
parent706c37274c36a219ba6b0ece995bb36e7072b5e8 (diff)
downloadpki-5952a82975063c4ec27303091a44e586d1386933.tar.gz
pki-5952a82975063c4ec27303091a44e586d1386933.tar.xz
pki-5952a82975063c4ec27303091a44e586d1386933.zip
Moved web application context file.
The location of web application context file has been changed from <instance>/webapps/<name>/META-INF/context.xml into <instance>/conf/Catalina/localhost/<name>.xml. This will eventually allow deploying the web application directly from the shared folder. A new upgrade script has been added to move the context files in the existing instances. Ticket #499
Diffstat (limited to 'base/common')
-rw-r--r--base/common/python/pki/util.py15
-rw-r--r--base/common/upgrade/10.1.0/.gitignore4
-rw-r--r--base/common/upgrade/10.1.99/.gitignore4
3 files changed, 23 insertions, 0 deletions
diff --git a/base/common/python/pki/util.py b/base/common/python/pki/util.py
index 62aec2c47..a0481852d 100644
--- a/base/common/python/pki/util.py
+++ b/base/common/python/pki/util.py
@@ -97,3 +97,18 @@ def copydirs(source, dest):
os.utime(dest, (st.st_atime, st.st_mtime))
os.chmod(dest, st.st_mode)
os.chown(dest, st.st_uid, st.st_gid)
+
+def chown(path, uid, gid):
+ """
+ Change ownership of a folder and its contents.
+ """
+
+ os.chown(path, uid, gid)
+
+ for item in os.listdir(path):
+ itempath = os.path.join(path, item)
+
+ if os.path.isfile(itempath):
+ os.chown(itempath, uid, gid)
+ elif os.path.isdir(itempath):
+ chown(itempath, uid, gid)
diff --git a/base/common/upgrade/10.1.0/.gitignore b/base/common/upgrade/10.1.0/.gitignore
new file mode 100644
index 000000000..5e7d2734c
--- /dev/null
+++ b/base/common/upgrade/10.1.0/.gitignore
@@ -0,0 +1,4 @@
+# Ignore everything in this directory
+*
+# Except this file
+!.gitignore
diff --git a/base/common/upgrade/10.1.99/.gitignore b/base/common/upgrade/10.1.99/.gitignore
new file mode 100644
index 000000000..5e7d2734c
--- /dev/null
+++ b/base/common/upgrade/10.1.99/.gitignore
@@ -0,0 +1,4 @@
+# Ignore everything in this directory
+*
+# Except this file
+!.gitignore