This extension is designed to execute shell commands and display their output on DekiWiki. This extension is based onVivieny's Deki_Extension_for_PHP and needs at least DekiWiki 8.05. If you have any question, please open a new thread on the forum and send me a private message with the post link.
ln -s /bin/ps /exec/ps
This function will execute the parameter program and display the command output on the wiki page. For example:
{{ shell.exec("ps") }}
will display something similar to
PID TTY TIME CMD 8523 ? 00:01:04 mono 14984 ? 00:00:00 apache2 14987 ? 00:00:00 apache2 14988 ? 00:00:00 apache2 14989 ? 00:00:00 apache2 15526 ? 00:00:00 apache2 15527 ? 00:00:00 apache2 15528 ? 00:00:00 apache2 15529 ? 00:00:00 apache2 15530 ? 00:00:00 apache2 15531 ? 00:00:00 apache2 15911 ? 00:00:00 ps
This function will display a link that will open a new window display the command output . For example:
{{ shell.execExternal("ps") }}
will display something similar to
ps
| File | Version | Size | Modified | |
|---|---|---|---|---|
| ||||
| ||||
| Images 0 | ||
|---|---|---|
| No images to display in the gallery. |
Copyright © 2011 MindTouch, Inc. Powered by
I had a real fight to get this extension to go, however, because our server's PHP environment doesn't have xmlwriter available. Eventually I resorted to rewriting DekiExt.php so that it wrote the XML directly. I've uploaded my version to this page if anyone wants to try it.
I also had to modify the uri in the shell.php execFunction() code, replacing 'localhost' with our server's name, as we have a rewrite rule set up. I was getting 'HTTP 301 Page moved permanently' errors.