add option to diable SSL
This commit is contained in:
parent
693b338dd1
commit
bb7787a76c
@ -3,7 +3,7 @@
|
||||
<!DOCTYPE PLUGIN [
|
||||
<!ENTITY name "shellinabox-plugin">
|
||||
<!ENTITY author "dmacias72">
|
||||
<!ENTITY version "2016.01.07b">
|
||||
<!ENTITY version "2016.01.07c">
|
||||
<!ENTITY launch "Settings/Shellinabox">
|
||||
<!ENTITY gitURL "https://raw.githubusercontent.com/&author;/unRAID-plugins/master">
|
||||
<!ENTITY pluginURL "&gitURL;/plugins/&name;.plg">
|
||||
@ -20,6 +20,8 @@ This Plugin installs and controls shellinabox for unRaid 6.1 All dependencies a
|
||||
-->
|
||||
|
||||
<CHANGES>
|
||||
###2016.01.07c
|
||||
- add option to disable SSL
|
||||
###2016.01.07b
|
||||
- remove install cert button for now
|
||||
###2016.01.07a
|
||||
|
@ -13,6 +13,8 @@ Shell In A Box implements a web server that can export arbitrary command line to
|
||||
<Icon>https://raw.githubusercontent.com/dmacias72/unRAID-plugins/master/plugins/shellinabox-plugin.png</Icon>
|
||||
<Date>2016-01-07</Date>
|
||||
<Changes>
|
||||
###2016.01.07c
|
||||
- add option to disable SSL
|
||||
###2016.01.07b
|
||||
- remove install cert button for now
|
||||
###2016.01.07a
|
||||
|
@ -20,7 +20,7 @@ iframe {
|
||||
</style>
|
||||
|
||||
<div>
|
||||
<iframe id="shell" src="https://<?=$shellinabox_host?>:<?=$shellinabox_port;?>">
|
||||
<iframe id="shell" src="http://<?=$shellinabox_host?>:<?=$shellinabox_port;?>">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
|
@ -14,7 +14,7 @@ $shellinabox_cert = isset($shellinabox_cfg['CERT']) ? $shellinabox_cfg['CERT'
|
||||
$shellinabox_running = trim(shell_exec( "[ -f /proc/`cat /var/run/shellinaboxd.pid 2> /dev/null`/exe ] && echo 'yes' || echo 'no' 2> /dev/null" ));
|
||||
$shellinabox_version = shell_exec( "/usr/sbin/shellinaboxd --version 2>&1 | grep ShellInABox | sed -e 's/^ShellInABox version //'" );
|
||||
$shellinabox_version = ($shellinabox_running == "yes") ?
|
||||
"<a style='color:green;' target='_blank' href='https://".$shellinabox_host.":".$shellinabox_port."' title='Click on link then accept security, then /Tools/CommandLine will work'><b>$shellinabox_version</b></a>":
|
||||
"<a style='color:green;' target='_blank' href='http://".$shellinabox_host.":".$shellinabox_port."' title='Click on link then accept security, then /Tools/CommandLine will work'><b>$shellinabox_version</b></a>":
|
||||
"<b><font style='color:orange;'>$shellinabox_version</font></b>";
|
||||
?>
|
||||
|
||||
@ -34,6 +34,12 @@ Connect by IP Address:
|
||||
<?=mk_option($shellinabox_ipaddr, "enable", "Yes");?>
|
||||
</select>
|
||||
|
||||
Enable SSL connection:
|
||||
: <select id="SSL" name="SSL" size="1" class="stopped">
|
||||
<?=mk_option($shellinabox_ssl, "disable", "No");?>
|
||||
<?=mk_option($shellinabox_ssl, "enable", "Yes");?>
|
||||
</select>
|
||||
|
||||
Port:
|
||||
: <input style="width:135px" id="PORT" type="text" class="stopped" name="PORT" maxlength="40" value="<?=$shellinabox_port;?>" title="port must be 0-65535" placeholder="Default Port is 8000" >
|
||||
|
||||
@ -57,6 +63,7 @@ $(function(){
|
||||
|
||||
function resetDATA(form) {
|
||||
form.IPADDR.value = "disable";
|
||||
form.SSL.value = "disable";
|
||||
form.PORT.value = "4200";
|
||||
form.RUNAS.value = "nobody";
|
||||
form.USERS.value = "nobody";
|
||||
@ -110,6 +117,7 @@ function verifyDATA(form) {
|
||||
}
|
||||
form.SERVICE.value = form.SERVICE.value.replace(/ /g,"_");
|
||||
form.IPADDR.value = form.IPADDR.value.replace(/ /g,"_");
|
||||
form.SSL.value = form.SSL.value.replace(/ /g,"_");
|
||||
form.PORT.value = form.PORT.value.replace(/ /g,"_");
|
||||
form.RUNAS.value = form.RUNAS.value.replace(/ /g,"_");
|
||||
}
|
||||
|
@ -12,16 +12,22 @@ USER_CSS="Color:+$STYLES/color.css,Monochrome:-$STYLES/monochrome.css;White:+$ST
|
||||
|
||||
# no-op if already running
|
||||
if [ ! -r $PIDFILE ]; then
|
||||
sleep 1
|
||||
nohup /usr/sbin/$prog --user=$RUNAS --background=$PIDFILE --port=$PORT --cert=$CONFIG --user-css=$USER_CSS > /dev/null 2>&1 | logger -tshellinaboxd &
|
||||
touch $LOCKFILE
|
||||
TIMER=0
|
||||
while [ ! -e $PIDFILE ]; do
|
||||
|
||||
SSL_CONFIG=""
|
||||
if [ $SSL == "disable" ]; then
|
||||
SSL_CONFIG="--disable-ssl"
|
||||
fi
|
||||
|
||||
sleep 1
|
||||
let TIMER=$TIMER+1
|
||||
if [ $TIMER -gt 5 ]; then
|
||||
echo -n "$PIDFILE not created"
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
nohup /usr/sbin/$prog --user=$RUNAS --background=$PIDFILE --port=$PORT --cert=$CONFIG --user-css=$USER_CSS $SSL_CONFIG > /dev/null 2>&1 | logger -tshellinaboxd &
|
||||
touch $LOCKFILE
|
||||
TIMER=0
|
||||
while [ ! -e $PIDFILE ]; do
|
||||
sleep 1
|
||||
let TIMER=$TIMER+1
|
||||
if [ $TIMER -gt 5 ]; then
|
||||
echo -n "$PIDFILE not created"
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user