summaryrefslogtreecommitdiff
path: root/devgerrit/script/phpldapadmin.sh
diff options
context:
space:
mode:
Diffstat (limited to 'devgerrit/script/phpldapadmin.sh')
-rwxr-xr-xdevgerrit/script/phpldapadmin.sh25
1 files changed, 25 insertions, 0 deletions
diff --git a/devgerrit/script/phpldapadmin.sh b/devgerrit/script/phpldapadmin.sh
new file mode 100755
index 0000000..7479bcd
--- /dev/null
+++ b/devgerrit/script/phpldapadmin.sh
@@ -0,0 +1,25 @@
+#!/bin/bash
+#===============================================================================
+# Copyright (c) 2014-2015 Samsung Electronics Co., Ltd.
+# Author onstudy@samsung.com
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation; version 2 of the License
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the GNU General Public License for more details.
+#===============================================================================
+set -e
+
+if [ ! -e "/etc/phpldapadmin/config.php" ]
+then
+ mkdir -p /etc/phpldapadmin
+ cp -r /etc/phpldapadmin_backup/* /etc/phpldapadmin
+ rm -rf /etc/phpldapadmin_backup
+fi
+
+chown -R root:${APACHE_RUN_USER} /etc/phpldapadmin/
+