From 4e85b423354d8b715d12540fbd2ac79a66de3399 Mon Sep 17 00:00:00 2001 From: MaZderMind Date: Sun, 11 Dec 2016 19:56:22 +0100 Subject: add download-command cli interface & config --- index.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'index.php') diff --git a/index.php b/index.php index 6c62e34..9b4689c 100644 --- a/index.php +++ b/index.php @@ -27,6 +27,22 @@ require_once('model/Upcoming.php'); ob_start(); +if(isset($argv) && isset($argv[1])) +{ + require('lib/command-helper.php'); + + switch($argv[1]) + { + case 'download': + require('command/download.php'); + exit(0); + } + + stderr("Unknown Command: %s", $argv[1]); + exit(1); +} + + try { if(isset($_GET['htaccess'])) { -- cgit v1.2.3