summaryrefslogtreecommitdiff
path: root/libexec
diff options
context:
space:
mode:
authorGunnar Wrobel <wrobel@pardus.de>2008-02-06 09:34:31 (GMT)
committerGunnar Wrobel <wrobel@pardus.de>2008-02-06 09:34:31 (GMT)
commitb5b16f530832032f88fa259da9130fcb7988ede7 (patch)
treef49c8a885753d30335fca7515bd6ff38b9d1363e /libexec
parentcc92989b5c4da5e1285d3d42b4bc2af18bf43f1b (diff)
downloadkolab-server-b5b16f530832032f88fa259da9130fcb7988ede7.tar.gz
Add the generatefc script.
Diffstat (limited to 'libexec')
-rw-r--r--libexec/generatefb.in65
1 files changed, 65 insertions, 0 deletions
diff --git a/libexec/generatefb.in b/libexec/generatefb.in
new file mode 100644
index 0000000..842b5d7
--- /dev/null
+++ b/libexec/generatefb.in
@@ -0,0 +1,65 @@
+#
+# LICENSE
+# -------
+#
+# 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; either version 2 of the License, or
+# (at your option) any later version.
+#
+# 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.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+# $Revision$
+#
+# ABOUT
+# -----
+#
+# This script regenerates the cached free/busy information.
+#
+#
+
+CLI_USER="manager"
+CLI_PASS=""
+
+usage() {
+ echo "Script for updating freebusy information on a kolab server.";
+ echo "Normal usage is:";
+ echo
+ echo " kolab generatefb [-h] [-u=<manager>] -p=<password>";
+ echo
+ echo "Usage:"
+ echo " -u The IMAP user used for regenerating the cache."
+ echo " (the default is the manager but you may also "
+ echo " specify a user name to regenrate just this users"
+ echo " cache data)"
+ echo " -p Password for the selected user"
+ exit 1
+}
+
+while getopts hu:p: ARGS; do
+ case $ARGS in
+ h) # Display help
+ usage
+ ;;
+ u) # User
+ export CLI_USER="${OPTARG}"
+ ;;
+ p) # Pass
+ export CLI_PASS="${OPTARG}"
+ ;;
+ esac
+done
+
+/* Password must be supplied */
+if [ -n "CLI_PASS" ]; then
+ usage();
+fi
+
+php -c @sysconfdir@/apache/php.ini @freebusy_confdir@/generatefb.php