From b5f77aff390944bb47c9ce2da1d5d9857550f9a9 Mon Sep 17 00:00:00 2001 From: Willian Galvani Date: Thu, 14 Oct 2021 13:48:10 -0300 Subject: [PATCH] core: add motd message Co-authored-by: ES-Alexander --- core/Dockerfile | 1 + core/configuration/motd | 18 ++++++++++++++++++ core/start-companion-core | 2 +- 3 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 core/configuration/motd diff --git a/core/Dockerfile b/core/Dockerfile index 661a71e8b8..56c9aea648 100644 --- a/core/Dockerfile +++ b/core/Dockerfile @@ -32,6 +32,7 @@ RUN /home/pi/libs/install-libs.sh # Set tmux configuration file COPY configuration/tmux.conf /etc/tmux.conf +COPY configuration/motd /etc/motd # Install services COPY services /home/pi/services diff --git a/core/configuration/motd b/core/configuration/motd new file mode 100644 index 0000000000..204aa84996 --- /dev/null +++ b/core/configuration/motd @@ -0,0 +1,18 @@ + +Welcome to Companion 1.0! + +What you currently see is a tmux session built into Companion's docker container. +This means you are not in the host Raspbian OS itself, and most of the data in here is +not-persistent, except for things in /root/.config, although you should not store your data there. + +USAGE NOTES: +To check all running services, press ctrl+b, then s. This will show all current sessions, +and is helpful for checking the state of individual services, restarting them, and checking their verbose outputs. + +To split the screen horizontally, press ctrl+b then % +To split the screen vertically press ctrl+b then " (this is currently not working) +To switch tabs, press ctrl+b then use the directional keys in the keyboard + +To login into the Raspberry Pi itself, do "ssh localhost" (NOT IMPLEMENTED) + +Happy Hacking! diff --git a/core/start-companion-core b/core/start-companion-core index cdf1c98380..9e79c135a4 100755 --- a/core/start-companion-core +++ b/core/start-companion-core @@ -31,7 +31,7 @@ SERVICES=( 'filebrowser',"filebrowser --database /etc/filebrowser/filebrowser.db --baseurl /file-browser" 'versionchooser',"$SERVICES_PATH/versionchooser/main.py" 'ping',"$SERVICES_PATH/ping/main.py" - 'ttyd',"ttyd -p 8088 /usr/bin/tmux" + 'ttyd',"ttyd -p 8088 /usr/bin/tmux new-session \\\\; send-keys 'cat /etc/motd' C-m \\\\;" 'nginx',"nginx -g \"daemon off;\" -c $TOOLS_PATH/nginx/nginx.conf" )