aboutsummaryrefslogtreecommitdiff
path: root/scripts/reboot.php
diff options
context:
space:
mode:
authorChristian Weiske <cweiske@cweiske.de>2010-12-08 20:19:41 +0100
committerChristian Weiske <cweiske@cweiske.de>2010-12-08 20:19:41 +0100
commitace4f4e56406f2754b142b4252f0411636b5b49d (patch)
treec9d8c7fd27ffac83e9a902884b7db9eff1b9dfe9 /scripts/reboot.php
parent91b1fbec4593fb717ce5bc06ebd6f197b5d516b3 (diff)
downloadlinksys-wrt3g-tools-ace4f4e56406f2754b142b4252f0411636b5b49d.tar.gz
linksys-wrt3g-tools-ace4f4e56406f2754b142b4252f0411636b5b49d.zip
move executable scripts to scripts/
Diffstat (limited to 'scripts/reboot.php')
-rw-r--r--scripts/reboot.php23
1 files changed, 23 insertions, 0 deletions
diff --git a/scripts/reboot.php b/scripts/reboot.php
new file mode 100644
index 0000000..a7be1be
--- /dev/null
+++ b/scripts/reboot.php
@@ -0,0 +1,23 @@
+<?php
+/**
+* Reboots the router
+*
+* PHP version 5
+*
+* @category Tools
+* @package linksys-wrt3g-tools
+* @author Christian Weiske <cweiske@cweiske.de>
+* @license AGPL v3
+* @link http://cweiske.de/linksys-wrt3g-tools.htm
+*/
+require_once dirname(__FILE__) . '/config.php';
+require_once 'Wrt3g.php';
+
+try {
+ $w = new Wrt3g();
+ $resp = $w->reboot();
+ echo $resp->getStatus() . ' ' . $resp->getReasonPhrase() . "\n";
+} catch (Exception $e) {
+ echo 'Error: ' . $e->getMessage() . "\n";
+}
+?> \ No newline at end of file