diff options
Diffstat (limited to 'config/anyterm')
-rw-r--r-- | config/anyterm/access_anyterm.php | 44 | ||||
-rw-r--r-- | config/anyterm/anyterm.inc | 118 | ||||
-rw-r--r-- | config/anyterm/anyterm.xml | 116 | ||||
-rwxr-xr-x | config/anyterm/binaries7/anytermd | bin | 3111332 -> 0 bytes | |||
-rwxr-xr-x | config/anyterm/binaries8/anytermd | bin | 3156865 -> 0 bytes |
5 files changed, 0 insertions, 278 deletions
diff --git a/config/anyterm/access_anyterm.php b/config/anyterm/access_anyterm.php deleted file mode 100644 index b1703932..00000000 --- a/config/anyterm/access_anyterm.php +++ /dev/null @@ -1,44 +0,0 @@ -<?php -/* - access_anyterm.php - pfSense package (http://www.pfSense.com) - Copyright (C) 2009 Scott Ullrich <sullrich@pfsense.org> - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY - AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, - OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - POSSIBILITY OF SUCH DAMAGE. -*/ - -require("guiconfig.inc"); - -if($config['installedpackages']['anyterm']['config'][0]['stunnelport']) { - $port = $config['installedpackages']['anyterm']['config'][0]['stunnelport']; - $httpors = "https"; -} else { - $port = $config['installedpackages']['anyterm']['config'][0]['port']; - $httpors = "http"; -} - -$location = "{$_SERVER['SERVER_ADDR']}:{$port}/anyterm.html"; - -Header("Location: {$httpors}://{$location}"); - -?>
\ No newline at end of file diff --git a/config/anyterm/anyterm.inc b/config/anyterm/anyterm.inc deleted file mode 100644 index 5ec4e5f1..00000000 --- a/config/anyterm/anyterm.inc +++ /dev/null @@ -1,118 +0,0 @@ -<?php -/* - anyterm.inc - pfSense package (http://www.pfSense.com) - Copyright (C) 2009 Scott Ullrich <sullrich@pfsense.org> - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY - AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, - OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - POSSIBILITY OF SUCH DAMAGE. -*/ - -function anyterm_deinstall() { - global $g, $config; - conf_mount_rw(); - exec("killall anytermd"); - exec("rm /usr/local/etc/rc.d/anyterm.sh"); - exec("rm /usr/local/sbin/anytermd"); -} - -function anyterm_install() { - global $g, $config; - - conf_mount_rw(); - - // Grab latest version of executablevi / - $freebsdv=trim(`uname -r | cut -d'.' -f1`); - `fetch -q -o /usr/local/sbin/ https://packages.pfsense.org/packages/config/anyterm/binaries{$freebsdv}/anytermd`; - exec("chmod a+rx /usr/local/sbin/anytermd"); - - if($config['installedpackages']['anyterm']['config'][0]['username']) - $port = " --port {$config['installedpackages']['anyterm']['config'][0]['port']}"; - - // This will bring up the pfSense style menu - $anytermd_command = "anytermd --user root --command '/etc/rc.initial' --auth trivial $port"; - - $anyterm = <<<EOD -#!/bin/sh - -# PROVIDE: anyterm -# REQUIRE: LOGIN -# KEYWORD: FreeBSD - -. /etc/rc.subr - -name="anyterm" -rcvar=`set_rcvar` -command="/usr/local/bin/anyterm" -anyterm_enable=\${anyterm-"YES"} - -start_cmd="anyterm_start" -stop_postcmd="anyterm_stop" - -load_rc_config \$name - -anyterm_start () { - if [ -f /var/etc/anyterm.conf ]; then - if [ `ps awux | grep -v grep | grep anytermd | wc -l` -gt 0 ]; then - killall anytermd - fi - /usr/bin/env \ - PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \ - /usr/local/bin/php -q -d auto_prepend_file=config.inc <<ENDOFF - <?php - require_once("globals.inc"); - require_once("functions.inc"); - require_once("anyterm.inc"); - anyterm_install(); - ?> -ENDOFF - - fi -} - -anyterm_stop () { - echo "Stopping anyterm." - killall anyterm -} - -run_rc_command "\$1" - -EOD; - - // Write out file - $fd = fopen("/usr/local/etc/rc.d/anyterm.sh", "w"); - fwrite($fd, $anyterm); - fclose($fd); - // Make executable - exec("chmod a+rx /usr/local/etc/rc.d/anyterm.sh"); - - // Write out Anyterm configuration file (username and password for auth) - $fd = fopen("/var/etc/anyterm.conf", "w"); - fwrite($fd, $config['installedpackages']['anyterm']['config'][0]['username'] . "\n"); - fwrite($fd, $config['installedpackages']['anyterm']['config'][0]['password'] . "\n"); - fclose($fd); - exec("chmod a-r /var/etc/anyterm.conf ; chmod ug+r /var/etc/anyterm.conf ; killall anytermd"); - exec($anytermd_command); - -} - -?>
\ No newline at end of file diff --git a/config/anyterm/anyterm.xml b/config/anyterm/anyterm.xml deleted file mode 100644 index f3b78012..00000000 --- a/config/anyterm/anyterm.xml +++ /dev/null @@ -1,116 +0,0 @@ -<?xml version="1.0" encoding="utf-8" ?> -<!DOCTYPE packagegui SYSTEM "../schema/packages.dtd"> -<?xml-stylesheet type="text/xsl" href="../xsl/package.xsl"?> -<packagegui> - <copyright> - <![CDATA[ -/* $Id$ */ -/* ========================================================================== */ -/* - anyterm.xml - pfSense package (http://www.pfSense.com) - Copyright (C) 2009 Scott Ullrich - All rights reserved. - */ -/* ========================================================================== */ -/* - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY - AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, - OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - POSSIBILITY OF SUCH DAMAGE. - */ -/* ========================================================================== */ - ]]> - </copyright> - <name>anyterm</name> - <version>1.0</version> - <title>anyterm</title> - <aftersaveredirect>/pkg_edit.php?xml=anyterm.xml&id=0</aftersaveredirect> - <include_file>/usr/local/pkg/anyterm.inc</include_file> - <menu> - <name>Anyterm</name> - <tooltiptext></tooltiptext> - <section>Diagnostics</section> - <url>/pkg_edit.php?xml=anyterm.xml&id=0</url> - </menu> - <service> - <name>Anyterm</name> - <rcfile>anyterm.sh</rcfile> - <executable>anytermd</executable> - <description>Ajax Interactive Shell</description> - </service> - <configpath>installedpackages->anyterm->config</configpath> - <additional_files_needed> - <prefix>/usr/local/pkg/</prefix> - <chmod>077</chmod> - <item>https://packages.pfsense.org/packages/config/anyterm/anyterm.inc</item> - </additional_files_needed> - <additional_files_needed> - <prefix>/usr/local/www/</prefix> - <chmod>077</chmod> - <item>https://packages.pfsense.org/packages/config/anyterm/access_anyterm.php</item> - </additional_files_needed> - <tabs> - <tab> - <text>Settings</text> - <url>/pkg_edit.php?xml=anyterm.xml&id=0</url> - <active/> - </tab> - <tab> - <text>Ajax Shell</text> - <url>access_anyterm.php</url> - </tab> - </tabs> - <fields> - <field> - <fielddescr>Username</fielddescr> - <fieldname>username</fieldname> - <description>Enter the username for accessing Anyterm</description> - <type>input</type> - </field> - <field> - <fielddescr>Password</fielddescr> - <fieldname>password</fieldname> - <description>Enter the password for accessing Anyterm</description> - <type>password</type> - </field> - <field> - <fielddescr>Port</fielddescr> - <fieldname>port</fieldname> - <description>Enter the port that Anyterm will listen on Default is 8080.</description> - <type>input</type> - </field> - <field> - <fielddescr>STunnel Port</fielddescr> - <fieldname>stunnelport</fieldname> - <description> - <![CDATA[ - [OPTIONAL] If you have setup a STunnel forward (recommended!) enter its port here. - ]]> - </description> - <type>input</type> - </field> - </fields> - <custom_php_resync_config_command> - anyterm_install(); - </custom_php_resync_config_command> - <custom_php_deinstall_command> - anyterm_deinstall(); - </custom_php_deinstall_command> -</packagegui>
\ No newline at end of file diff --git a/config/anyterm/binaries7/anytermd b/config/anyterm/binaries7/anytermd Binary files differdeleted file mode 100755 index ce5304e7..00000000 --- a/config/anyterm/binaries7/anytermd +++ /dev/null diff --git a/config/anyterm/binaries8/anytermd b/config/anyterm/binaries8/anytermd Binary files differdeleted file mode 100755 index 733f7197..00000000 --- a/config/anyterm/binaries8/anytermd +++ /dev/null |