Skip to content
Snippets Groups Projects
Commit 14b0e904 authored by Jörg Sachse's avatar Jörg Sachse
Browse files

feat: show disapp version on login

parent 7c7755a3
No related branches found
No related tags found
No related merge requests found
Pipeline #3316 failed
...@@ -40,10 +40,15 @@ SSH_FINGERPRINT="$( ssh-keyscan "${HOSTNAME}" 2> /dev/null | ssh-keygen -E sha25 ...@@ -40,10 +40,15 @@ SSH_FINGERPRINT="$( ssh-keyscan "${HOSTNAME}" 2> /dev/null | ssh-keygen -E sha25
done done
)" )"
WEATHER="$( curl -s --max-time 2 'http://rss.accuweather.com/rss/liveweather_rss.asp?metric=1&locCode=EUR|DE|DE01069|DRESDEN|' | sed --quiet '/Currently:/ s/.*: \(.*\): \(-*[0-9]*\)\([CF]\).*/\2°\3, \1/p' )" WEATHER="$( curl -s --max-time 2 'http://rss.accuweather.com/rss/liveweather_rss.asp?metric=1&locCode=EUR|DE|DE01069|DRESDEN|' | sed --quiet '/Currently:/ s/.*: \(.*\): \(-*[0-9]*\)\([CF]\).*/\2°\3, \1/p' )"
SUBAPP_VERSION="(not installed)" # make these two empty, so they only ever show up if the Dis-/SubApps are installed
DISAPP_VERSION=""
SUBAPP_VERSION=""
if [[ $( command -v dpkg ) ]]; then if [[ $( command -v dpkg ) ]]; then
if dpkg -l | grep -q 'dissemination-application4rosetta'; then
DISAPP_VERSION="\nDisApp-Version: $( dpkg --status dissemination-application4rosetta | grep '^Version:' | cut -d ' ' -f 2 )"
fi
if dpkg -l | grep -q 'submission-application4rosetta'; then if dpkg -l | grep -q 'submission-application4rosetta'; then
SUBAPP_VERSION="$( dpkg --status submission-application4rosetta | grep '^Version:' | cut -d ' ' -f 2 )" SUBAPP_VERSION="\nSubApp-Version: $( dpkg --status submission-application4rosetta | grep '^Version:' | cut -d ' ' -f 2 )"
fi fi
fi fi
# alternative weather service that provides much nicer icons. However, these icons are not shown nicely in PuTTY # alternative weather service that provides much nicer icons. However, these icons are not shown nicely in PuTTY
...@@ -57,8 +62,7 @@ OS-Version: ${VERSION} ...@@ -57,8 +62,7 @@ OS-Version: ${VERSION}
Uptime / CPU-Load: ${UPTIME} Uptime / CPU-Load: ${UPTIME}
Running Processes: ${PROCESSES} Running Processes: ${PROCESSES}
SSH-Fingerprint: Len SHA256:Fingerprint Hostname (Key-Algo)\\n${SSH_FINGERPRINT} SSH-Fingerprint: Len SHA256:Fingerprint Hostname (Key-Algo)\\n${SSH_FINGERPRINT}
Wetter: ${WEATHER} Wetter: ${WEATHER}${DISAPP_VERSION}${SUBAPP_VERSION}
SubApp-Version: ${SUBAPP_VERSION}
- Use 'tmux a' to attach to last tmux session. - Use 'tmux a' to attach to last tmux session.
- Press 'Strg+B' and 'd' to leave (detatch from) any tmux session. The session will continue to run in the background. - Press 'Strg+B' and 'd' to leave (detatch from) any tmux session. The session will continue to run in the background.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment