diff options
author | Evan Prodromou <evan@controlyourself.ca> | 2009-06-22 17:02:40 -0700 |
---|---|---|
committer | Evan Prodromou <evan@controlyourself.ca> | 2009-06-22 17:02:40 -0700 |
commit | 0b638a233cb97668b340c1321c61b305966805a9 (patch) | |
tree | b2c192eef75acbe772e901113f13f14859707bce /scripts/maildaemon.php | |
parent | 66316c0ce637816f172ffcc680cbb89f393f17e6 (diff) |
maildaemon.php uses commandline.inc
Diffstat (limited to 'scripts/maildaemon.php')
-rwxr-xr-x | scripts/maildaemon.php | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/scripts/maildaemon.php b/scripts/maildaemon.php index dc3ab0b56..cfb11a36f 100755 --- a/scripts/maildaemon.php +++ b/scripts/maildaemon.php @@ -18,21 +18,16 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -# Abort if called from a web server -if (isset($_SERVER) && array_key_exists('REQUEST_METHOD', $_SERVER)) { - print "This script must be run from the command line\n"; - exit(); -} - define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); -define('LACONICA', true); -// Preset the server at the command line +$helptext = <<<END_OF_HELP +Script for converting mail messages into notices. Takes message body +as STDIN. + +END_OF_HELP; -$server = ($argc > 1) ? $argv[1] : null; -$path = ($argc > 2) ? $argv[2] : null; +require_once INSTALLDIR.'/scripts/commandline.inc'; -require_once(INSTALLDIR . '/lib/common.php'); require_once(INSTALLDIR . '/lib/mail.php'); require_once('Mail/mimeDecode.php'); |