mirror of
https://github.com/mynodebtc/mynode.git
synced 2024-11-12 08:29:16 +00:00
Add WebSSH Client
This commit is contained in:
parent
ed7a7a5422
commit
84cdcd3a79
24
rootfs/standard/etc/systemd/system/webssh2.service
Normal file
24
rootfs/standard/etc/systemd/system/webssh2.service
Normal file
|
@ -0,0 +1,24 @@
|
|||
# WebSSH2 service
|
||||
# /etc/systemd/system/webssh2.service
|
||||
|
||||
[Unit]
|
||||
Description=WebSSH2
|
||||
Wants=www.service
|
||||
After=www.service
|
||||
|
||||
[Service]
|
||||
WorkingDirectory=/opt/mynode/webssh2
|
||||
ExecStart=/usr/bin/docker run --rm --name webssh2 -p 2222:2222 webssh2
|
||||
|
||||
User=root
|
||||
Group=root
|
||||
Type=simple
|
||||
TimeoutSec=240
|
||||
Restart=always
|
||||
RestartSec=60
|
||||
StandardOutput=syslog
|
||||
StandardError=syslog
|
||||
SyslogIdentifier=webssh2
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
|
@ -17,6 +17,7 @@ ufw allow 10080 comment 'allow Lightning REST RPC'
|
|||
ufw allow 9735 comment 'allow Lightning'
|
||||
ufw allow 8333 comment 'allow Bitcoin mainnet'
|
||||
ufw allow 18333 comment 'allow Bitcoin testnet'
|
||||
ufw allow 2222 comment 'allow WebSSH2'
|
||||
ufw allow 3000 comment 'allow LndHub'
|
||||
ufw allow 3002 comment 'allow BTC RPC Explorer'
|
||||
#ufw allow 3004 comment 'allow LND Admin'
|
||||
|
|
|
@ -179,7 +179,7 @@ if [ $IS_PREMIUM -eq 1 ]; then
|
|||
python setupall.py --client-bitcoin
|
||||
deactivate
|
||||
|
||||
#echo $JOINMARKET_VERSION > $JOINMARKET_VERSION_FILE
|
||||
echo $JOINMARKET_VERSION > $JOINMARKET_VERSION_FILE
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@ -227,6 +227,28 @@ if [ "$CURRENT" != "$BTCRPCEXPLORER_UPGRADE_URL" ]; then
|
|||
echo $BTCRPCEXPLORER_UPGRADE_URL > $BTCRPCEXPLORER_UPGRADE_URL_FILE
|
||||
fi
|
||||
|
||||
# Upgrade WebSSH2
|
||||
WEBSSH2_UPGRADE_URL=https://github.com/billchurch/webssh2/archive/v0.2.10-0.tar.gz
|
||||
WEBSSH2_UPGRADE_URL_FILE=/home/bitcoin/.mynode/.webssh2_url
|
||||
CURRENT=""
|
||||
if [ -f WEBSSH2_UPGRADE_URL_FILE ]; then
|
||||
CURRENT=$(cat $WEBSSH2_UPGRADE_URL_FILE)
|
||||
fi
|
||||
if [ "$CURRENT" != "$WEBSSH2_UPGRADE_URL" ]; then
|
||||
cd /opt/mynode
|
||||
rm -rf webssh2
|
||||
wget $WEBSSH2_UPGRADE_URL -O webssh2.tar.gz
|
||||
tar -xvf webssh2.tar.gz
|
||||
rm webssh2.tar.gz
|
||||
mv webssh2-* webssh2
|
||||
cd webssh2
|
||||
mv app/config.json.sample app/config.json
|
||||
docker build -t webssh2 .
|
||||
|
||||
echo $WEBSSH2_UPGRADE_URL > $WEBSSH2_UPGRADE_URL_FILE
|
||||
fi
|
||||
|
||||
|
||||
# Install ngrok for debugging
|
||||
if [ ! -f /usr/bin/ngrok ]; then
|
||||
cd /tmp
|
||||
|
@ -247,6 +269,7 @@ systemctl enable usb_driver_check
|
|||
systemctl enable https
|
||||
systemctl enable glances
|
||||
systemctl enable netdata
|
||||
systemctl enable webssh2
|
||||
|
||||
# Disable any old services
|
||||
sudo systemctl disable hitch
|
||||
|
|
|
@ -237,6 +237,11 @@
|
|||
window.open(url,'_blank');
|
||||
})
|
||||
|
||||
$("#linux_terminal").on("click", function() {
|
||||
url = 'http://'+location.hostname+':2222/ssh/host/'+location.hostname
|
||||
window.open(url,'_blank');
|
||||
})
|
||||
|
||||
$( function() {
|
||||
var downloadHandle = $( "#download-handle" );
|
||||
var uploadHandle = $( "#upload-handle" );
|
||||
|
@ -371,6 +376,12 @@
|
|||
<a id="glances" class="ui-button ui-widget ui-corner-all settings_button_small" href="#">Open Glances</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Manage</td>
|
||||
<td style="padding-left: 20px;">
|
||||
<a id="linux_terminal" class="ui-button ui-widget ui-corner-all settings_button_small" href="#">Linux Terminal</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Disk Usage</td>
|
||||
<td style="padding-left: 20px;">{{drive_usage}}</td>
|
||||
|
|
Loading…
Reference in New Issue
Block a user