diff --git a/environment-setup/femtofox.chroot b/environment-setup/femtofox.chroot index 7b5aafa..2f51999 100644 --- a/environment-setup/femtofox.chroot +++ b/environment-setup/femtofox.chroot @@ -43,8 +43,8 @@ pip3 install requests pyephem pytap2 meshtastic pypubsub geopy maidenhead beauti if [[ $? -eq 2 ]]; then echo "Error, step failed..."; fi echo "Downloading ttyd and enabling service..." -wget -qO- https://api.github.com/repos/tsl0922/ttyd/releases/latest | grep "browser_download_url" | grep "armhf" | cut -d '"' -f 4 | xargs wget -O /opt/ttyd -chmod +x /opt/ttyd +wget -qO- https://api.github.com/repos/tsl0922/ttyd/releases/latest | grep "browser_download_url" | grep "armhf" | cut -d '"' -f 4 | xargs wget -O /opt/ttyd/ttyd +chmod +x /opt/ttyd/ttyd systemctl enable ttyd echo "Setting MOTD..." diff --git a/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/etc/systemd/system/ttyd.service b/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/etc/systemd/system/ttyd.service index de35349..ab6cd49 100644 --- a/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/etc/systemd/system/ttyd.service +++ b/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/etc/systemd/system/ttyd.service @@ -1,10 +1,10 @@ [Unit] -Description=TTYD +Description=ttyd Web Terminal After=syslog.target After=network.target [Service] -ExecStart=/opt/ttyd -W -6 login +ExecStart=/opt/ttyd/ttyd -W -6 login Type=simple Restart=always User=root diff --git a/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/opt/ttyd/license b/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/opt/ttyd/license new file mode 100644 index 0000000..54ab6d8 --- /dev/null +++ b/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/opt/ttyd/license @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2016-2025 Shuanglei Tao + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/femto-config b/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/femto-config index 0c60518..385e83b 100755 --- a/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/femto-config +++ b/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/femto-config @@ -293,7 +293,7 @@ $(ingest_data "femto-meshtasticd-config.sh -i" 15)" 0 0 while true; do echo "Checking web terminal status..." ttyd_state=$(replace_colors "$(femto-utils.sh -t "check")") - [[ $ttyd_state == *"running"* ]] && ttyd_state+="\nWeb terminal available at \Zuhttp://$(hostname).local:7681\Zn" + [[ $ttyd_state == *"running"* ]] && ttyd_state+="\nWeb terminal available at \Zuhttps://$(hostname).local:7681\Zn" choice=$(dialog --no-collapse --colors --title "Web Terminal" --cancel-label "Back" --help-button --default-item "$choice" --item-help --menu "Current state: $ttyd_state" 14 58 2 \ $(if ! echo "$ttyd_state" | grep -q 'enabled and running'; then echo "Enable and start (default) x  "; fi) \ $(if echo "$ttyd_state" | grep -q 'enabled'; then echo "Disable and stop x  "; fi) \ @@ -305,7 +305,7 @@ $(ingest_data "femto-meshtasticd-config.sh -i" 15)" 0 0 if [ $exit_status -eq 1 ]; then # Exit the loop if the user selects "Cancel" or closes the dialog break elif [ $exit_status -eq 2 ]; then # Help ("extra") button - dialog --no-collapse --colors --title "Web terminal help" --msgbox "Web terminal is a browser based terminal interface, and can be used as a replacement for an SSH client such as PuTTY.\n\nWeb terminal is enabled by default on Foxbuntu." 0 0 + dialog --no-collapse --colors --title "Web terminal help" --msgbox "Web terminal is a browser based terminal interface, and can be used as a replacement for an SSH client such as PuTTY.\nSSL encryption is provided by keys generated during first-boot. Your browser may give a warning about the self-signed encryption certificate.\n\nWeb terminal is provided by ttyd.\nLicense for ttyd: \`cat /opt/ttyd/license\`.\nFor more details, see: \Zuhttps://github.com/tsl0922/ttyd\Zn\n\nWeb terminal is enabled by default on Foxbuntu." 0 0 else case $choice in "Enable and start (default)") femto-utils.sh -t "enable" ;;