Fix MOTD: Remove escaped vars, shorten Debian boilerplate
- Fix TEMP_NUM/TEMP_EMOJI variables (no escaping in quoted heredoc) - Shorten /etc/motd to one-liner with license path reference 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
14
rpi/setup.sh
14
rpi/setup.sh
@@ -455,11 +455,11 @@ if systemctl is-active --quiet stegasoo 2>/dev/null; then
|
|||||||
echo -e " 🚀 Stegasoo running 🌐 \033[0;33m$STEGASOO_URL\033[0m"
|
echo -e " 🚀 Stegasoo running 🌐 \033[0;33m$STEGASOO_URL\033[0m"
|
||||||
if [ -n "$CPU_MHZ" ] && [ -n "$CPU_TEMP" ]; then
|
if [ -n "$CPU_MHZ" ] && [ -n "$CPU_TEMP" ]; then
|
||||||
# Temp emoji: ice<50, cool 50-70, fire>70
|
# Temp emoji: ice<50, cool 50-70, fire>70
|
||||||
TEMP_NUM=\$(echo "\$CPU_TEMP" | grep -oE "[0-9]+" | head -1)
|
TEMP_NUM=$(echo "$CPU_TEMP" | grep -oE "[0-9]+" | head -1)
|
||||||
if [ -n "\$TEMP_NUM" ]; then
|
if [ -n "$TEMP_NUM" ]; then
|
||||||
if [ "\$TEMP_NUM" -ge 70 ]; then
|
if [ "$TEMP_NUM" -ge 70 ]; then
|
||||||
TEMP_EMOJI="🔥"
|
TEMP_EMOJI="🔥"
|
||||||
elif [ "\$TEMP_NUM" -ge 50 ]; then
|
elif [ "$TEMP_NUM" -ge 50 ]; then
|
||||||
TEMP_EMOJI="😎"
|
TEMP_EMOJI="😎"
|
||||||
else
|
else
|
||||||
TEMP_EMOJI="🧊"
|
TEMP_EMOJI="🧊"
|
||||||
@@ -467,7 +467,7 @@ if systemctl is-active --quiet stegasoo 2>/dev/null; then
|
|||||||
else
|
else
|
||||||
TEMP_EMOJI="🌡"
|
TEMP_EMOJI="🌡"
|
||||||
fi
|
fi
|
||||||
echo -e " \033[0;35m⚡\033[0m \${CPU_MHZ} MHz \${TEMP_EMOJI} \${CPU_TEMP}"
|
echo -e " \033[0;35m⚡\033[0m ${CPU_MHZ} MHz ${TEMP_EMOJI} ${CPU_TEMP}"
|
||||||
fi
|
fi
|
||||||
echo -e "\033[38;5;93m══════════════\033[38;5;99m══════════════\033[38;5;105m══════════════\033[38;5;117m══════════════\033[0m"
|
echo -e "\033[38;5;93m══════════════\033[38;5;99m══════════════\033[38;5;105m══════════════\033[38;5;117m══════════════\033[0m"
|
||||||
echo ""
|
echo ""
|
||||||
@@ -481,6 +481,10 @@ MOTDEOF
|
|||||||
sudo chmod 644 /etc/profile.d/stegasoo-motd.sh
|
sudo chmod 644 /etc/profile.d/stegasoo-motd.sh
|
||||||
echo " Created login banner"
|
echo " Created login banner"
|
||||||
|
|
||||||
|
# Shorten the default Debian MOTD boilerplate
|
||||||
|
echo "Debian GNU/Linux · License: /usr/share/doc/*/copyright" | sudo tee /etc/motd > /dev/null
|
||||||
|
echo " Shortened system MOTD"
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo -e "${BOLD}Installation Complete!${NC}"
|
echo -e "${BOLD}Installation Complete!${NC}"
|
||||||
echo -e "${BLUE}-------------------------------------------------------${NC}"
|
echo -e "${BLUE}-------------------------------------------------------${NC}"
|
||||||
|
|||||||
Reference in New Issue
Block a user