Start a bin/ directory for Horde for scripts that are expected to be run as part
authorChuck Hagenbuch <chuck@horde.org>
Fri, 8 Jan 2010 15:28:52 +0000 (10:28 -0500)
committerChuck Hagenbuch <chuck@horde.org>
Fri, 8 Jan 2010 15:28:52 +0000 (10:28 -0500)
of either using or maintaining Horde.

horde/bin/alarms [new file with mode: 0755]
horde/scripts/alarms.php [deleted file]

diff --git a/horde/bin/alarms b/horde/bin/alarms
new file mode 100755 (executable)
index 0000000..a75115a
--- /dev/null
@@ -0,0 +1,35 @@
+#!/usr/bin/env php
+<?php
+/**
+ * Copyright 2007-2009 The Horde Project (http://www.horde.org/)
+ *
+ * See the enclosed file COPYING for license information (LGPL). If you
+ * did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
+ *
+ * @author Jan Schneider <jan@horde.org>
+ */
+
+// Do CLI checks and environment setup first.
+require_once dirname(__FILE__) . '/../lib/core.php';
+
+// Make sure no one runs this from the web.
+if (!Horde_Cli::runningFromCLI()) {
+    exit("Must be run from the command line\n");
+}
+
+// Load the CLI environment - make sure there's no time limit, init some
+// variables, etc.
+Horde_Cli::init();
+
+// Include needed libraries.
+new Horde_Application(array('authentication' => 'none'));
+
+// Authenticate as administrator.
+if (!count($conf['auth']['admins'])) {
+    exit("You must have at least one administrator configured to run the alarms.php script.\n");
+}
+Horde_Auth::setAuth($conf['auth']['admins'][0], array());
+
+// Run
+$horde_alarm = Horde_Alarm::factory();
+$horde_alarm->notify(null, true, false, array('notify'));
diff --git a/horde/scripts/alarms.php b/horde/scripts/alarms.php
deleted file mode 100755 (executable)
index a75115a..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/usr/bin/env php
-<?php
-/**
- * Copyright 2007-2009 The Horde Project (http://www.horde.org/)
- *
- * See the enclosed file COPYING for license information (LGPL). If you
- * did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
- *
- * @author Jan Schneider <jan@horde.org>
- */
-
-// Do CLI checks and environment setup first.
-require_once dirname(__FILE__) . '/../lib/core.php';
-
-// Make sure no one runs this from the web.
-if (!Horde_Cli::runningFromCLI()) {
-    exit("Must be run from the command line\n");
-}
-
-// Load the CLI environment - make sure there's no time limit, init some
-// variables, etc.
-Horde_Cli::init();
-
-// Include needed libraries.
-new Horde_Application(array('authentication' => 'none'));
-
-// Authenticate as administrator.
-if (!count($conf['auth']['admins'])) {
-    exit("You must have at least one administrator configured to run the alarms.php script.\n");
-}
-Horde_Auth::setAuth($conf['auth']['admins'][0], array());
-
-// Run
-$horde_alarm = Horde_Alarm::factory();
-$horde_alarm->notify(null, true, false, array('notify'));